Stencyl 3.4.0 is now out. Get it now!

Bug Issue: convertToPseudoUnicode() not working in HTML5


Pages: 1

FMStudioGameDev

  • Subscriber - Stencyl Studio
  • *
January 17, 2017, 08:56:59 am
Well title explains  almost everything.
There is no way to show special characters when targetting HTML5, function
Code: [Select]
convertToPseudoUnicode() allows to display everything correctly on all platforms except HTML5.
This is quite a crucial issue for some languages (russian and korean for example, but also impossible to show some characters in spanish, french, german...)
Thank you


Issue updated by rob1221 - January 17, 2017, 09:15:11 am
  • Category changed from Font Editor to Engine


Justin

  • Master Stencyler
  • *
September 04, 2017, 06:45:07 pm
I don't see an obvious difference between html5 and other non-flash targets. Could you share an example and the expected/actual output?
  • Issue Assigned from (none) to Justin
  • Status changed from New to Need Info


yoplalala

  • Subscriber - Stencyl Studio
  • *
October 10, 2017, 02:13:17 pm
Indeed, the character just doesn't show when you want to draw it.
   it should be créer, but the é has disappeared.

if you trace it
in flash:
créer
in html:
cr~x9000er

https://github.com/Stencyl/stencyl-engine/blob/ba1065422321de30e8e9bc955177395d21742ad7/com/stencyl/behavior/Script.hx#L3765

if you trace the formatted string

in windows: 00E9
in html:9000
« Last Edit: October 10, 2017, 03:23:32 pm by yoplalala »


yoplalala

  • Subscriber - Stencyl Studio
  • *
October 10, 2017, 04:15:18 pm
// add UTF-8 to utf8List
               trace("push " + internationalText.charCodeAt(utf8count));
                  utf8List.push(internationalText.charCodeAt(utf8count));
                  realCount += 1;

In windows :
push 195
push 169

In Html
push 233

some problems with charCodeAt ?


yoplalala

  • Subscriber - Stencyl Studio
  • *
October 11, 2017, 01:06:36 am
The problem is that js is UTF16  so you nee to convert from UTF16 to UTF32 and not from UTF8 to UTF32


yoplalala

  • Subscriber - Stencyl Studio
  • *
October 11, 2017, 02:40:42 am
Okay if it html5/js
it seems you can skip many conversions.

Should work for two bytes characters, but not for 4 bytes characters
var formattedHexString:String = "00" + StringTools.hex(character);


Stopping here :)


Pages: 1

Details

  • Reported
    January 17, 2017, 08:56:59 am
  • Updated
    October 11, 2017, 02:40:42 am

  • View Status
    Public
  • Type
    Bug
  • Status
    Need Info
  • Priority
    Normal
  • Version
    Stencyl 3.4
  • Fixed in
    (none)
  • Assigned to
    Justin
  • Category
    Engine

Tags