# Strings

**URL:** https://talk.remobjects.com/t/strings/27818
**Category:** Oxygene
**Created:** [January 26, 2023, 11:51pm UTC](https://talk.remobjects.com/t/strings/27818 "2023-01-26T23:51:12Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tampatex](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/t/4af34b/32.png) [@tampatex](https://talk.remobjects.com/u/tampatex)
#### Post date: [January 26, 2023, 11:51pm UTC](https://talk.remobjects.com/t/strings/27818/1 "2023-01-26T23:51:12Z")

</div>

I receive a Run error\* for a large WASM Ap because of too large of a constant Array[0…236, 0…2] of String. Reducing the number of strings to 216 solves the problem. No string is large, just names of City, State, & County.

It appears to be a memory problem with run error “local count too large” since it is only memory going from a table size of 236 to 216.

**Is this a problem with the way WASM stores Strings or would it apply to any vars, say too many integers?**

WASM does not support Ansistring which would reduce the memory footprint by 2 & probably solve the problem for now. **Does anyone have a class I could include to support Ansistrings to try it?**

If I have a String-memory problem but would not have a byte/integer memory problem **can I can solve it by encoding my strings as bytes & convert to Strings for display?**

\*Run Time Error Msg:  
Uncaught (in promise) CompileError: WebAssembly.instantiate(): Compiling function #5922:“ms\_t16\_AIANFPA285\_1AIANFPA2858\_\_d\_cctor” failed:  
local count too large @+2687485

Thanks for any help  
–tex

Thanks,

–tex **strong text**

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [January 27, 2023, 12:39pm UTC](https://talk.remobjects.com/t/strings/27818/2 "2023-01-27T12:39:41Z")

</div>

> [@tampatex](#):
>
> Is this a problem with the way WASM stores Strings or would it apply to any vars, say too many integers?

One way to find out 😉

> [@tampatex](#):
>
> WASM does not support Ansistring which would reduce the memory footprint by 2 & probably solve the problem for now. **Does anyone have a class I could include to support Ansistrings to try it?**

I don’t think that’s the roper solution here, but:

> [@tampatex](#):
>
> but would not have a byte/integer memory problem **can I can solve it by encoding my strings as bytes & convert to Strings for display?**

…that would be one way to do it, yes, use the Encoding class to get, say UTF-8 byte representation of the strings for storage, and expand them back to (wide)strings for display purposes.

_That said_, 700 (short-ish) strings don’t sound like it should be too much memory-wise, so this might be a genuine bug worth investigating. Any chance you could send us a _simple_ test case that illustrates this so we can have a look?
