Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UTF-8 troubles under Linux #14

Closed
akaspin opened this issue Aug 5, 2011 · 16 comments
Closed

UTF-8 troubles under Linux #14

akaspin opened this issue Aug 5, 2011 · 16 comments

Comments

@akaspin
Copy link

akaspin commented Aug 5, 2011

I set content type preference for erlang files to UTF-8 (from https://www.assembla.com/spaces/erlide/tickets/852-unicode-content-is-mangled-in-documentation-hover).

Under Windows all ok.

But under linux (Debian Testing x64) I get big headache:

  • Files not open with error "Could not open the editor: Erlang tools do not support source files encoded in UTF-8"
  • If file opens, code hidlightin is garbed.
@vladdu
Copy link
Collaborator

vladdu commented Aug 8, 2011

I will see what I can do, but this is not easy. Basically we would
have to change all our APIs to use binaries instead of strings,
because jinterface assumes Latin-1 encoding. If there's a difference
between Windows and Linux, then there are maybe some OS APIs involved
here too...

I don't know what to do -- on one hand I understand that it's a
problem for many people, on the other hand it's not really supported
by Erlang (it just happens to work with Emacs).

regards,
Vlad

On Fri, Aug 5, 2011 at 15:46, akaspin
reply@reply.github.com
wrote:

I set content type preference for erlang files to UTF-8 (from https://www.assembla.com/spaces/erlide/tickets/852-unicode-content-is-mangled-in-documentation-hover).

Under Windows all ok.

But under linux (Debian Testing x64) I get big headache:

  • Files not open with error "Could not open the editor: Erlang tools do not support source files encoded in UTF-8"
  • If file opens, code hidlightin is garbed.

Reply to this email directly or view it on GitHub:
#14

@akaspin
Copy link
Author

akaspin commented Aug 8, 2011

Thanks for advance. But I think this behavior should be documented.

@vladdu
Copy link
Collaborator

vladdu commented Aug 8, 2011

It's been at https://github.com/erlide/erlide/wiki/FAQ since a while ago.

On Mon, Aug 8, 2011 at 17:16, akaspin
reply@reply.github.com
wrote:

Thanks for advance. But I think this behavior should be documented.

Reply to this email directly or view it on GitHub:
#14 (comment)

@akaspin
Copy link
Author

akaspin commented Aug 8, 2011

Yep. I read it first. I was referring to the behavior under Linux.

@sblask
Copy link

sblask commented Nov 1, 2011

I've got an issue with UTF-8 under Linux as well. I created a minimal test file that allows reproducing it:

-module(test).
test() ->
"öäå".

$ file test.erl
test.erl: ISO-8859 text

So it has ISO-8859-1 encoding and also contains latin1 characters only, so it should work, but it gives me "Could not open the editor: Erlang tools do not support source files encoded in UTF-8"

@sblask
Copy link

sblask commented Nov 7, 2011

I do have some files with ä in strings which do open, but I've got the same problem as akaspin - the highlighting is funny. Per special character used, the highlighting is shifted by one. I.e. If I've got a string "ä" and anywhere later in the file a fun(), it is not fun that is highlighted, but un(

@vladdu
Copy link
Collaborator

vladdu commented Nov 7, 2011

Sorry for the delay, I was on vacation.

Please try the latest build from http://erlide.org/update_nightly, at least the highlighting problem should be fixed.

Regarding the other issue, do you have Eclipse set up to see .erl files as UTF-8? Check window->preferences->general->content types->text files->erlang and make sure the encoding is ISO-8859-1. Press the "Update" button or the setting is not saved.

@sblask
Copy link

sblask commented Nov 7, 2011

Update to the nightly fixed both issues for me! Thank you very much!

@sblask
Copy link

sblask commented Nov 8, 2011

Highlighting problem persists in synchronize view though...

@vladdu
Copy link
Collaborator

vladdu commented Nov 9, 2011

Which synchronize view? The SCM one? What version control do you use?

@sblask
Copy link

sblask commented Nov 9, 2011

Actually, it's the compare view/editor "Erlang source file Compare" It also happens when I compare two random files from navigator, so not only in synchronize view. I'm using EGit though in case that changes something.

@vladdu
Copy link
Collaborator

vladdu commented Nov 9, 2011

ok, thanks, I will look at it.

@vladdu
Copy link
Collaborator

vladdu commented Nov 9, 2011

It works for me. Could you please provide an example for how to reproduce?

@ghost ghost assigned vladdu Nov 9, 2011
@sblask
Copy link

sblask commented Nov 9, 2011

Sure, create a module with following content:

-module(new_file_one).

test() ->
["This is a test ä"].

test2() ->
["This is a test ä"].

and a second file, which can be empty. Select both in Navigator, right click and choose compare with > each other. The highlighting in test2 is shifted by one character in compare editor.

@vladdu
Copy link
Collaborator

vladdu commented Sep 18, 2013

Is this still a problem? Since Erlang supports utf-8, it should not need any specific hacks anymore.

@vladdu
Copy link
Collaborator

vladdu commented Dec 2, 2013

I assume this works now. Please reopen if this is not the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants