Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

UTF8 support in CoronaCards for WP8
Started by alexxwiz Nov 17 2016 06:16 AM

2 replies to this topic
This topic has been archived. This means that you cannot reply to this topic.
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Observer

  • 6 posts
  • Corona SDK

Can we some how get utf8 support in CoronaCards for WP8?

I know than CoronaCards does not support plugins, but utf8 is a base thing.


Maybe we can use it in some way? 


Please, give me any clues!

[TOPIC: post.html]

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,683 posts
  • Enterprise

I don't know how helpful this will be, but the source for the plugin is here:




You probably could integrate it through Visual Studio. I'll ask our engineering team if they have any advice.



[TOPIC: post.html]

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

You would have to implement this yourself in .NET, such as in C# or VB.NET.


We document how to communicate between Lua and .NET here...



From there, you can use our "CoronaLabs.WinRT.Utf8String" helper class on the .NET side.  We publically document this class here...



Note that .NET "String" objects are UTF-16 encoded.  When you pass a String in from Lua to .NET, Corona automatically transcodes that Lua string from UTF-8 to a .NET UTF-16 encoded String object.  When you pass a .NET String back to Lua, Coron automatically transcodes it from UTF-16 to a UTF-8 encoded Lua string.  So, you can use our "Utf8String" class linked above to create a UTF-8 encoded string from a .NET String (which is UTF-16).  From there, you can do the operations you need to perform with its methods.