Encoding error in PHP with Google Translate -


I have some text which I need to translate to Japanese.

translate article, webpage, or document

Google Translate returns this string:

  翻訳 テ キ ス ト, web ペ ー ジ, ま た は ド メ ン ト  

When I'm writing that text to a file (ja.po), it Appears:

  - | What can I do?  

I'm using poeditor .exe . I am currently not using any encoding function.

 for  (/ * extracted from the stringed string array) / $ {$ Pattern = "/ \" ". Preg_quote ($ id, /') ."\"(\r?\n)msgstr \ "\" / "; $ String = str_replace ('' ',' \" ', $ string); $ Substitution = "a \" $ id \ "\ nmsgstr \" "$ string" \ "". $ Res = preg_replace ($ pattern, $ replacement, $ conn); $ To = $ res; } File_put_contents ("ja.po", $ con);  

How are you getting the string from Google and how are you writing it? Somewhere it changes from UTF 8 to Latin 1. I think you can find out where this happens, use it to decide.

Btw, translation is very bad Japanese. ;)


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -