Answer the question
In order to leave comments, you need to log in
How can I convert the given text into the correct encoding?
Hello! There is a text:
Locking: 10.12.1995
: 4000.00
ñðîîêêêààààíííí ääää
:::::::::: :é
:: :ééééééééééééé
Answer the question
In order to leave comments, you need to log in
The text you provided is Win-1251 characters, i.e. "A"=0xC0 ... "i"=0xFF, converted to UTF, not according to the rules for Cyrillic (to get 0x0410...0x044F), but simply as regular extended ASCII (0x00C0..0x00FF). Those. some of the processes that encode from ASCII to UTF does not understand how to work with Win-1251 Cyrillic. For the reverse conversion, in fact, you need to decode UTF->ASCII, and then declare the resulting Win-1251 data block and convert Win-1251->UTF forward. I don't know how to do it in PHP, sorry...
PS By the way, post an example of your file somewhere in its original form. Maybe it is your code that does not understand the encoding, if, according to your words, everything is displayed correctly in the web interface.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question