In my project "Fantasy Name Generator" i need to show some chars in different encoding, like in this "ndλ" the last letter should be shown another char. I know is encoding thing cause while in ultraedit it look correct at listview (or even notepad in windows) show like this.
So is there any way to show at listview the correct char?
Also there is a routine like StringConvert (string, encoding type) as string?
If this is possible can you give a small example also?
I copy the correct text from ultraedit in a class in b4a. But it is change to other text also. I dont read from text files, i make a self contain class. The text is hardcoded If i copy-paste the same text from class to ultraedit then text is shows correct again. Is a limit of b4a, java,...
All text within Basic4android/Java is comprised of UTF-16 Unicode characters so for internally generated text there should be no encoding problems. Encoding problems usually arise with externally created non Unicode text. It looks like you are pasting non-Unicode encoded text from your text editor.
I understand what you saying. Is there any way to show the text in the original form in listview? else i will change the chars or make another interface with layers, but i dont want to cause this way it lose the reason i use them (i want to show the 'elves' chars).
I just want to know if there is a way to show them? And if yes how.
This chars are extended ascii chars.
There should be but I don't know what it is as I don't understand what you are trying to do and I don't use Ultraedit which seems to be the source of the problem. Why not just save the text in a Unicode file and read it in to your application?
Like agraham mentioned above, save the text as UTF-8 and it will work, proof of that is the attached sample, it displays the characters you posted correctly on the ListView and a MsgBox.
NJDude: maybe i didnt say it correctly. i want to use the extended ascii string not the 'δσαιλ'.
In the attachment is a text file that use all the extended chars i want. If you use a text editor with the ability to read/write extended ascii chars you will see the string i want (ultraedit can do this or any editor that can read/write extended ascii chars will do the job) else you will see the string 'δσαιλ'.
I want to use some extended ascii chars (128-255).
I hope now i become more clear at what i am asking.
Also b4a editor seems that cant read/write this extended ascii chars. I say this because when i copy-paste the string at b4a the string transform to 'δσαιλ'.
Also if i cant hardwrite the chars, can i create dynamically at runtime (if yes pls a sample will be great).
NJDude: i see that your text is working.
I am trying to save the the file as UTF-8 and get wrong chars.
My 'chars.txt' is the original file (if you can turn i will be graceful, so i can correct my app)
The 'charsUTF8.txt" is the file after i save it as UTF-8. I dont know what i doing wrong? I want to know what i doing wrong so i can become better.
I feel like stupid right now