Click here to Skip to main content
15,912,897 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hello! Can you help me. I hae the text:

Êîìïàêòíûé è ýêîíîìè÷íûé ìîòîð Ec

I try convert it to UTF-8 with iconv:
PHP
return iconv ("windows-1252","windows-1252", $text);

But it does not work.
How to convert?

[Edit]Code block added[/Edit]
Posted
Updated 5-Jun-13 8:10am
v3

1 solution

The input charset and output charset you have are exactly the same, so its not converting it.

Try something like:
PHP
iconv("windows-1252", "UTF-8", $text)

[Edit]Code block added[/Edit]
 
Share this answer
 
v2
Comments
Jardin1 5-Jun-13 15:04pm    
Now i got the next: ÊîìïàêòíûÃ
Jardin1 5-Jun-13 15:43pm    
i can not define encode:

ñâîèõ êàòåãîðèÿõ å
Ron Beyer 5-Jun-13 16:13pm    
what encoding is the text that you are starting from, how do you know its windows-1252?
Jardin1 5-Jun-13 16:22pm    
i used online service that showed me way of recoding
Ron Beyer 5-Jun-13 16:48pm    
I don't think you understand what I'm asking... you want to convert TO UTF-8, but what are you starting from, do you know what the original encoding is?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900