EasyXDM fails when large unicode text (Japanese) is being used on IE7 #134

Open
heurion opened this Issue Oct 28, 2011 · 1 comment

Comments

Projects
None yet
2 participants
@heurion

heurion commented Oct 28, 2011

on IE7 if you are using EasyXDM Flash Transport, it fails to transfer large unicode text.

This is because... unicode characters such as Japanese use 2 byte characters rather than single byte ASCII characters. Because of this even though we break the messages into multiple chunks of 40000 each (refer to The solution is in https://github.com/oyvindkinsey/easyXDM/blob/master/src/flash/net.easyxdm.flash/Main.as maxMessageLength value
), the final bytes transferred will be more than 40000.

And since Action Script's LocalConnection.send supports only upto 40KB... the chunks fail to transfer data

You might want to change maxMessageLength from 40000 to lesser i.e. about 35000 or provide a method to dynamically assume somewhere less than 40000.

@oyvindkinsey

This comment has been minimized.

Show comment
Hide comment
@oyvindkinsey

oyvindkinsey Nov 15, 2011

Owner

In theory all of the characters could be multi-byte characters, and so just using 35000 isn't a viable option.
We would have to actually get the bytecount and then use this, but this also means that we would need to reliably be able to split multibyte strings based on a bytecount, pass these through localconnection and then reassemble the string.

Maybe someone with more AS experience (and more time) could take a look at this?

Owner

oyvindkinsey commented Nov 15, 2011

In theory all of the characters could be multi-byte characters, and so just using 35000 isn't a viable option.
We would have to actually get the bytecount and then use this, but this also means that we would need to reliably be able to split multibyte strings based on a bytecount, pass these through localconnection and then reassemble the string.

Maybe someone with more AS experience (and more time) could take a look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment