Opened 12 years ago
Closed 6 years ago
#1883 closed defect (fixed)
OMEdit has issues when opening files with special chars in them ...
Reported by: | Adrian Pop | Owned by: | Adrian Pop |
---|---|---|---|
Priority: | high | Milestone: | 1.14.0 |
Component: | OMEdit | Version: | trunk |
Keywords: | Cc: | Adeel Asghar, Martin Sjölund |
Description
The file in c:/tö/ö/ägg/åter/file.mo will not be
open and no error message will be given by OMEdit.
It might be an omc issue and not an OMEdit issue.
Change History (18)
comment:1 by , 12 years ago
Cc: | added |
---|
comment:2 by , 12 years ago
Uhmmm... You are sending an ISO-8859-1 ö... It works fine in a UTF-8 terminal:
$ omc +locale=C martinö/abc.mo /home/marsj/dev/trunk/build/bin/omc 1.9.0 Beta1 (r13118) class M end M;
If you have a non-UTF8 filesystem you need to add character conversion calls for this!
comment:4 by , 12 years ago
No, its still an omc issue but maybe only on Windows. Its better to fix it in omc rather than handling it in all clients since its the loadFile command that's failing.
comment:5 by , 12 years ago
I believe it's not loadFile, but rather parsing the input string. Like this session in OMShell-terminal:
>>> "åäö" "åäö" >>> getErrorString() "" # Changing terminal encoding to ISO-8859-1 here. >>> "åäö" Error occured building AST Syntax Error [<interactive>:1:0-1:3:writable] Error: The file was not encoded in UTF-8: "???". To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY"). To change it in a package: add a file package.encoding at the top-level. Note: The Modelica Language Specification only allows files encoded in UTF-8.
comment:6 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
So you need to change it to send a UTF-8 string in clients. Come on, everything is UTF-8 :) After that, we can look into making it convert filenames to Windows encoding when on Windows.
comment:8 by , 10 years ago
Milestone: | 1.9.1 → 1.9.2 |
---|
This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).
comment:9 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | assigned → accepted |
This is ugly but we need to use the wide char API in Windows (which supports UTF16).
comment:10 by , 10 years ago
Milestone: | 1.9.2 → 1.9.3 |
---|
Milestone changed to 1.9.3 since 1.9.2 was released.
comment:15 by , 8 years ago
Milestone: | 1.11.0 → 1.12.0 |
---|
Milestone moved to 1.12.0 due to 1.11.0 already being released.
comment:16 by , 7 years ago
Milestone: | 1.12.0 → 1.13.0 |
---|
comment:18 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
This has been fixed in some recent commits.
Ok, this seems to be an issue with omc.