tuarua / WebViewANE

WebView Adobe Air Native Extension for macOS 10.10+, Windows Desktop, iOS 9.0+ and Android 19+. This ANE provides access to a more modern webview from AIR.
Apache License 2.0
183 stars 53 forks source link

€ euro character is not properly encoded from JS->AS #155

Closed etriceur closed 6 years ago

etriceur commented 6 years ago

I know that #125 has solved many UTF-8 encoding issues but i'm still facing the issue with € character. I'm using version 1.6.1 of your windows ane version.

You can easily test it by modifying the WebViewANESample project and append the '€' character to the second parameter sent from button 1 hit ('Call Actionscript with Callback').

Is there any workaround? Thanks

tuarua commented 6 years ago

There is an issue in CEF passing from JS -> C# in UTF-8

Workaround: Use encodeURI in JS 'args': [1, encodeURI('I am a string€'), false]

and then in decodeURI AS decodeURI(paramB)

In future please use the issue template provided.

etriceur commented 6 years ago

Thanks this is working great

tuarua commented 6 years ago

With the latest version (1.7.0) you don't need to apply this workaround. I was using ANSI instead of UTF-8 in one section which I have now changed.