Cannot add special text characters to list item...

Neotron

  • Posts: 475
I want to translate some english text to different languages (like russian, turkish etc..)
My problem is if I wat to add the translated txt file to list item chars will looks bad. Somehow Stencyl not convert special character well if I want to import them from a text file (in the text file everything looks ok).

Strange is if I add them one by one to the list (with copy paste), so not import from txt file everything looks fine. (but this would be a pointless and very big work if there is an import function).
So maybe a bug maybe I do something wrong but cannot import special languages from txt file to a global List item with Stencyl.
Any idea?

yoplalala

  • *
  • Posts: 1632
When you draw them use the code
Script.convertToPseudoUnicode()

Neotron

  • Posts: 475
Thank you, but as I see I should use this Script.convertToPseudoUnicode() text conversion before EVERY text? I have hundreds of 1-2 words expressions. As I saw in another topic I need to add the list item to an attribute first then another attribute to convert with this code....:/
Any other solution?

yoplalala

  • *
  • Posts: 1632
I don't think there are other solutions. That's what is using Stencyl.

But I don't understand, import the text as usual. And use convertToPseudoUnicode only when you need to draw the text, not before importing the list. It's actually isn't bothersome.

Neotron

  • Posts: 475
I tried and everything looks fine on Flash but not on Android. On mobile some language characters are really strange mostly russian language (it shows only йййййй ййй йййй й characters).

yoplalala

  • *
  • Posts: 1632
damn .. I think I tested it on android and it worked with japanese and French. I'm going to test with the new version  when I can ( with russian too).

yoplalala

  • *
  • Posts: 1632
tested it. works fine for me.
Can you give me an example which doesn't work for you ?
(and maybe a screenshot of how you are using it)

Neotron

  • Posts: 475
First I import this russian.txt file to a global List item(after the import it looks awful so I manually copy paste all row in the list again). Then I use that behavior for the button actor to draw text on the button.
I attached a screenshot about the font type I use, it looks ok.
I use Stencyl build 8469. How you did that your russia text working on Android?
Thank you for your help!

yoplalala

  • *
  • Posts: 1632
I don't how I did, I used the same method you're using and tested some random words I found the internet...
I tried at 60 pixel, drawing, and using "homemade" labels and it still worked. But I don't see anything weird with your version.
Maybe there are too many characters in your font, and android doesn't like it. Try putting only the characters you know should appear in your font. That's the only idea I have for now :(

Neotron

  • Posts: 475
Can you send me a working .stencyl source example please?

yoplalala

  • *
  • Posts: 1632
Okay I know why .
I didn't want to give you my game so I created a test game. And surprise , it didn't work ... After trying multiple comparing, with my real game, I think it's because of the fonts used.
Open the stencyl file
( don't care about all the extensions not installed, it's my tes file, so that's where I test all my new extensions, ect)
apply just the external data extension.

Now if you compile it  appears nice.
But if you change font to an other default  one, id doesn't work, even though the characters appear on the font screen. Really weird.
(The font that I'm using  is Cousine, you can download it everywhere, it's a free font

Neotron

  • Posts: 475
Well, now everything working fine. :) Russian text appears well on Android as well. I used your Cousine font type, and only use one text attribute for the conversion like you did in this source.
Thank you for your great help! If you need any help or advice don't hesitate to contact me.
By the way I think you are developing something big...;-) If you will be close to finish it I would love to beta test your app on Android and iPhone too. :)

yoplalala

  • *
  • Posts: 1632
Cool  that it works! I was lucky to have tested directly in a "good font"  otherwise I would have never I guessed ...

Thanks for the proposition. I'll contact you maybe when it will be a stable (english)  beta version, but it will be in a few months from now :P

wolf2013

  • Posts: 70
Cool  that it works! I was lucky to have tested directly in a "good font"  otherwise I would have never I guessed ...

Thanks for the proposition. I'll contact you maybe when it will be a stable (english)  beta version, but it will be in a few months from now :P

Hi yoplalala

now that you found out this with the font COUSINE, is Script.convertToPseudoUnicode() still necessary for android or flash or iOS?

yoplalala

  • *
  • Posts: 1632
Yes you still need it.
But I think the bug that made characters that were not in the font appear in the font screen has been corrected.
So you can try other fonts if you want :)