japanese encoding is not displayed properly

Bug #192307 reported by Jeffrey Patrick Lui
4
Affects Status Importance Assigned to Milestone
gedit (Ubuntu)
Invalid
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gedit

I am working on some C++ source files for some clients. And while the english portions of the text, the code comments appear as square character code symbols. I tried opening the file in OpenOffice with EUC-JP encoding and it works fine. Unfortunately, Gedit doesn't even prompt me to choose encoding as it probably assumes I am opening a regular english text file.

Revision history for this message
Emmet Hikory (persia) wrote :

Which encoding is defined in your locale? Personally, I've not had any difficulties working with Japanese text for any of en_IN, en_US.utf8, ja_JP.utf8, or ru_RU.utf8.

Revision history for this message
Jeffrey Patrick Lui (punong-bisyonaryo) wrote :

I'm using en_US.utf8 and Japanese language support installed through System > Language Support. I also have SCIM installed and I can type Japanese and save them as well with no problem, however these files were from a Windows environment, but I am not sure if that is to blame.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. What version of Ubuntu do you use? Could you attach an example to the bug?

Changed in gedit:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Jeffrey Patrick Lui (punong-bisyonaryo) wrote :

I am using Feisty Fawn. I had removed most of the contents due to its proprietary nature. The file seems to have been saved with Western (ISO 8859-15) encoding, though I am not sure. In any case, I still maintain that this is a bug, since when I open it with any program in my office (not Linux) it opens just fine, proper character display and all.

Changed in gedit:
status: Incomplete → New
Revision history for this message
Jeffrey Patrick Lui (punong-bisyonaryo) wrote :

My apologies. I am using Gutsy Gibbon, not Feisty Fawn. I forgot that I had upgraded.

Revision history for this message
Ilya Barygin (randomaction) wrote :

This is possibly related to https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/67844 . Please try to open the file using the "file open" dialog and choose the appropriate encoding.

Revision history for this message
Sebastien Bacher (seb128) wrote :

can you get the example working correctly in other linux editors?

Changed in gedit:
status: New → Incomplete
Revision history for this message
Jeffrey Patrick Lui (punong-bisyonaryo) wrote :

I tried this with Medit with the same results. Vim nor nano also doesn't show it properly.

Revision history for this message
Sebastien Bacher (seb128) wrote :

there is no way to autodetect the encoding and utf-8 is used by default, that's likely not a bug

Revision history for this message
Sebastien Bacher (seb128) wrote :

closing, that's not a bug

Changed in gedit:
status: Incomplete → Invalid
Revision history for this message
Jeffrey Patrick Lui (punong-bisyonaryo) wrote :

I am not sure I understand nor agree why this is not a bug.

If a file that I know can be displayed properly is opened and it displays garbage because of it being opened with a wrong encoding, then I think that needs to be resolved. If the grounds for marking this bug as invalid is because it performs the same as other editors, then maybe we should take a good review of the other editors as well.

Can you please explain to me why the encoding cannot be detected? I understand that UTF-8 is like a standard and the sample.cpp file is probably encoded with another less standard encoding. Is there no way to detect the encoding except for manually selecting it?

Thanks.

Revision history for this message
Sebastien Bacher (seb128) wrote :

there is no way to automatically detect text encoding, the binary datas give chars than can be valid in different encodings

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.