2

I have a file in Hebrew, which is displayed now as Gibberish. On windows, what I've done at the past, I just converted the file using Notepad++ > Encoding > Convert to UTF-8 without BOM and then Hebrew was displayed.

On Ubuntu if I'm using Notepad++ (running on Wine) when I convert it, it is still displayed as Gibberish (but success to convert it to UTF-8 without BOM).

I wonder if there is a software which converts a file to UTF-8 without BOM at the same way as Notepad++ does (Convert -> Hebrew displayed > save).

I don't know why it still displays GIbberish on Notepad + Wine when I convert it. Wine supports Hebrew as I know (I can write their Hebrew and save it without problem).

  • 1
    What encoding are you converting FROM? Text editors sometimes try to autodetect the encoding that a given input file has, but one way or another, autodetected or manually specified, converting TO something only makes sense when it's FROM something else. So it sounds like your editor may be misautodetecting the input file's encoding. The most straightforward thing you can probably do is use iconv to convert the file because at least it's always perfectly clear what iconv is doing: iconv -f source-encoding -t target-encoding <infile >outfile. – Celada May 31 '13 at 22:09
  • Interesting question. I'm familiar with the Windows issue but in Linux I never had undesired byteordermarks so no real need to find out how to get rid of them. Well, you could always use sed or even dd to get rid of the byte order mark (dd if=filewithbom of=filewithoutbom bs=1 skip=3). – frostschutz May 31 '13 at 22:32
  • @Celada, it's the same action like I convert it to UTF-8 from gedit. it still Gibberish (even if the document is now UTF-8). – Luis May 31 '13 at 23:42
  • @frostschutz, can you explain yourself better? I am little confused because I'm really newbie to Ubuntu / any Linux. – Luis May 31 '13 at 23:42
  • @Luis, I think Celada meant what format is the file in before you convert it? Is it just UTF-8 with BOM? UTF-16? Some Hebrew-specific proprietary encoding? Etc. This would help to clarify the issue you're having and identify the failure point, because right now your question text says "success to convert it to UTF-8 without BOM" which implies that you have already solved the problem in this question's title. – Paul May 31 '13 at 23:50
1

Try Kate.

Kate is a multi-document editor. Choose it for viewing HTML sources, editing configuration files, writing new applications or any other text editing task. You still need just one running instance of Kate.

With a multi-view editor like Kate you get a lot of advantages. You can view several instances of the same document and all instances are synchronized. Or you can view more files at the same time for easy reference or simultaneous editing.1

To install kate, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install kate

1Source:Kate

  • in kate, when saving a file, we can choose the encoding. but we can not choose the source encoding, and there is only UTF-8, no "UTF8 with BOM" and "UTF-8 without BOM". – hoijui Oct 27 '17 at 6:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.