Danish character Å = ~x00e5 ?

wolf2013

  • Posts: 70
Hi
I've been fighting with this for two days now, the strange thing is that it happens only when I TEST GAME not when i TEST SCENE(works)

what's with this ~x00e5 code ? 

see attached

note:   when I try a NEW GAME everything works as it should

yoplalala

  • *
  • Posts: 1632
~x00e5  is unicode .

Didn't notice it changed from "test game "  and "test scene" . But I think I know why  ( for one it uses unicode, and the other it uses ansi.
edit : I have a way but it's long so I'll post it to you tomorrow. Don't hesitate to remind if I forget.
edit2:
try to put a code block inside the draw text block with

String.fromCharCode(haxe.Utf8.charCodeAt("your word",3))

inside

« Last Edit: May 19, 2016, 08:07:08 am by yoplalala »

wolf2013

  • Posts: 70
Hi yoplalala

thanx for you answer, when I use

String.fromCharCode(haxe.Utf8.charCodeAt("aråsds",2))
returns= å           <----     :)
 
but I need to use the attribute called "theWord"

String.fromCharCode(haxe.Utf8.charCodeAt(_theWord,2))
returns= ~            <----     :(


~x00e5  is unicode .

Didn't notice it changed from "test game "  and "test scene" . But I think I know why  ( for one it uses unicode, and the other it uses ansi.
edit : I have a way but it's long so I'll post it to you tomorrow. Don't hesitate to remind if I forget.
edit2:
try to put a code block inside the draw text block with

String.fromCharCode(haxe.Utf8.charCodeAt("your word",3))

inside

yoplalala

  • *
  • Posts: 1632
hum there's another way. I'll post tomorrow. have to go

wolf2013

  • Posts: 70
hum there's another way. I'll post tomorrow. have to go

thank you

yoplalala

  • *
  • Posts: 1632
do a global static block that returns a list and accepts a string  called UTF8Text

inside put a code block

Code: [Select]
var rawCounter:Int = 0;
var list:Array<Dynamic> = new Array();
while((rawCounter < ("" + __UTF8Text).length))
{
if((__UTF8Text.charCodeAt(rawCounter) == 126) && (__UTF8Text.charAt(rawCounter + 1) == 'x'))
{
list.push(__UTF8Text.substring(rawCounter, rawCounter+6));
rawCounter += 6;
}
else
{
list.push(__UTF8Text.charCodeAt(rawCounter));
rawCounter += 1;
}
}
return list;

now you can split your word and choose the character   with get item nbr  __ from __   :)