Sublime Forum

Encoding problems

#1

Hi. I have written a lot of files in utf-8 but now I need to convert them to ISO 8859-1. But I have a big problem with some files. When I click on “Save with encoding–> Western(ISO 8859-1)” it throws me an error: “Not all characters are representable in Western (ISO 8859-1), falling back to UTF-8”.

I cutted some lines of code to finally save it sucessfully and I found some lines can’t be convested. I tryed to paste the line here but when I send the form it throws me an error:
Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 1966080 bytes) in /home/sublimetext/www/forum/includes/utf/data/utf_compatibility_decomp.php on line 2

I wanted to attach a file with the line but I can’t attach any extension file. I tried .ja .txt .html and no extension and this form throws me: “The extension txt is not allowed.”

So I uploaded the file in my Dropbox: https://www.dropbox.com/s/uqk1wf9v9gfmi56/testingUTF8toWesternISO8895-1.txt

I re-write this line and works perfectly. But if I copy paste the line it doesn’t work.
This is a hard work considering that one file has 700 lines and the error thrown doesn’t specify the line which can’t convert.

What can I do??

0 Likes

#2

[quote]So I uploaded the file in my Dropbox: dropbox.com/s/uqk1wf9v9gfmi … 8895-1.txt
[/quote]

What a bad decision, because dropbox uses some type of charset detection to server files, and it fails terrible. Better, /upload/ to dropbox the original file, inside a zip archive. So there is no charset convertion.

0 Likes