Jump to content

Problem with text file in other language


techcone

Recommended Posts

Hello freaks :)

 

Here is my small problem, I have a text file in which some text in israel language is written, what I do is pick the contents for the file and post it on a site using curl.

 

Somehow, it is not posting it and showing gibberish characters.

 

Can please any one throw some light how to read the text file correctly in a string and how to encode it so that the text which is send correctly passed to the site ?

 

Thanks :)

$file = mb_convert_encoding(file_get_contents("file.txt"), "ISO-8859-8");

 

Don't forget to include the following in the <head> tags of the HTML document you're attempting to display said text in:

 

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-8">

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.