How do I convert ansi to utf-8?

Get help using Construct 2

Post » Fri Sep 26, 2014 11:38 am

hello there :) is there any way to convert ansi to utf-8?
B
6
S
1
Posts: 53
Reputation: 506

Post » Fri Sep 26, 2014 11:42 am

I usually do this in Notepad++

1) Download and install Notepad++ (google for it)
2) Open your text file
3) Under "Encoding", choose "Convert to UTF-8 without BOM"*

* Unless you need the BOM; in that case, just choose "Convert to UTF-8". :)


Notepad++ can also be set to always convert any opened text file to UTF-8.
B
12
S
2
Posts: 80
Reputation: 816

Post » Fri Sep 26, 2014 11:46 am

no, i need to convert files from mobile device
B
6
S
1
Posts: 53
Reputation: 506

Post » Fri Sep 26, 2014 12:15 pm

utf-8 is backwards compatible with ASCII, so there is nothing you need to do to convert ASCII to UTF-8. I don't think "ANSI" is a real text encoding, a quick Google turned up that it might mean "Windows-1252", but that's odd if you're talking about iOS/Android.
Scirra Founder
B
402
S
238
G
89
Posts: 24,624
Reputation: 196,015

Post » Fri Sep 26, 2014 12:22 pm

well, if text in english, there is no problems at all. but if lang in cyrillic...
You do not have the required permissions to view the files attached to this post.
B
6
S
1
Posts: 53
Reputation: 506

Post » Mon Sep 29, 2014 9:07 pm

Does this happen only when copy/pasting or does it happen if you type the text directly as well?

Also, are you sure the font you're using within c2 supports displaying said characters?

Also, while the text is garbled within the editor, does it display normally on preview?
B
36
S
8
G
8
Posts: 532
Reputation: 6,903

Post » Mon Sep 29, 2014 9:51 pm

Based on the file name, I would imagine you are looking at text from a different language. This happened to me when I was translating Japanese to English for an older game I was playing. Never did figure out how to fix it though.
B
56
S
15
G
13
Posts: 826
Reputation: 17,705

Post » Tue Sep 30, 2014 5:03 pm

Does this happen only when copy/pasting or does it happen if you type the text directly as well?

no, when typing its ok. only when im opening ANSI text file. UTF-8 works fine
Also, are you sure the font you're using within c2 supports displaying said characters?

yes, because UTF-8 is fine)
Also, while the text is garbled within the editor, does it display normally on preview?

i cant see it within editor, because im using FileChooser
Based on the file name, I would imagine you are looking at text from a different language. This happened to me when I was translating Japanese to English for an older game I was playing. Never did figure out how to fix it though.

yes, its in cyrillic. russian in this case.
B
6
S
1
Posts: 53
Reputation: 506

Post » Tue Sep 30, 2014 8:14 pm

Convert your ANSI files to UTF-8 then. Do like jakobdam said: use an editor like Notepad++ to open the text files, and save them in UTF-8.

Shuher wrote:no, i need to convert files from mobile device

I don't know what this means. Please explain more.
B
36
S
8
G
8
Posts: 532
Reputation: 6,903

Post » Thu Oct 02, 2014 5:21 pm

this is mean, that im using FileChooser to open text file. and i cant convert files in Notepad++ for all peoples, who will use my app.
B
6
S
1
Posts: 53
Reputation: 506

Next

Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 5 guests