Internal ScriptEditor - problem with UTF-8 chars

Moderator: pandel

mirkt
Beiträge: 95
Registriert: 05 Jun 2013, 09:39
Wohnort: Lithuania

Internal ScriptEditor - problem with UTF-8 chars

Beitrag von mirkt »

One more thing! :)

I was making some scripts with PackageBuilder and got problems with lithuanian characters (clients have seen "??" in opsi-winst messages instead of them).. ueluekmen suggested trying another editor:
viewtopic.php?f=8&t=5490#p24689

and it appeared that the problem is related to PackageBuilder..

What I have noticed:
PackageBuilder's script editor leaves strange symbols at the end of file:
Bild

Because of that:
$ file -i delsub3264.ins
delsub3264.ins: text/plain; charset=binary

after deleting those characters:

$ file -i delsub3264.ins
delsub3264.ins: text/plain; charset=iso-8859-1

Recoding to UTF-8:
$ recode iso8859-13..utf-8 delsub3264.ins

$ file -i delsub3264.ins
delsub3264.ins: text/plain; charset=utf-8

and now I can see lithuanian characters in opsi-winst messages..

What about UTF-8 support in PackageBuilder's internal script editor?

Good luck :)
pandel
Beiträge: 830
Registriert: 25 Jan 2013, 16:47

Re: Kommentare zum OPSI PackageBuilder

Beitrag von pandel »

Hi mirkt,

have been away for a while, so sorry for the late reply...

Thanks for your error report. I'll try to address this problem, but I think I'm not able to fix it any time soon.

Regards,
Holger
mirkt
Beiträge: 95
Registriert: 05 Jun 2013, 09:39
Wohnort: Lithuania

Re: Kommentare zum OPSI PackageBuilder

Beitrag von mirkt »

Dear pandel, are you going to release a new version of PackageBuilder?
pandel
Beiträge: 830
Registriert: 25 Jan 2013, 16:47

Re: Kommentare zum OPSI PackageBuilder

Beitrag von pandel »

Hi mirkt! I have version 5.9 ready and it is waiting for some tests. There won't be anything really fancy in it, some small improvements and compatibility issues have been addressed, and such... Regarding your UTF-8 problem with the included editor: I investigated the problem, but I'm not really sure why this is happening. As I use the Scintilla component internally for the main editor stuff, it should handle UTF-8 correctly by itself. Perhaps there is a bug in it or so... nevertheless, I am not aware of any kind of solution for this at the moment. Sorry to say that, I tried, but failed so far...
pandel
Beiträge: 830
Registriert: 25 Jan 2013, 16:47

Re: Kommentare zum OPSI PackageBuilder

Beitrag von pandel »

@mirkt: Gotcha! I think I have improved ScriptEditor's UTF-8 handling. Would you be willing to test it? That would help me a lot :mrgreen: ...
mirkt
Beiträge: 95
Registriert: 05 Jun 2013, 09:39
Wohnort: Lithuania

Re: Kommentare zum OPSI PackageBuilder

Beitrag von mirkt »

Wow, thank you!
pandel hat geschrieben:@mirkt: Gotcha! I think I have improved ScriptEditor's UTF-8 handling. Would you be willing to test it? That would help me a lot :mrgreen: ...
mirkt
Beiträge: 95
Registriert: 05 Jun 2013, 09:39
Wohnort: Lithuania

Re: Kommentare zum OPSI PackageBuilder

Beitrag von mirkt »

pandel hat geschrieben:@mirkt: Gotcha! I think I have improved ScriptEditor's UTF-8 handling. Would you be willing to test it? That would help me a lot :mrgreen: ...
Maybe I am doing something wrong, but it doesn't really work for me..

test package with Lithuanian characters in Message:
Bild

"Save" and reopen with simple script editor.. Lithuanian characters gone:
Bild

Adding Lithuanian characters with external editor:
Bild

Opening with simple script editor:
Bild

„Save“ and reopen:
Bild

By the way, ctrl + s still calls „Save As“ although it's written that ctrl + s = save
Bild

Thank you for all great work!
pandel
Beiträge: 830
Registriert: 25 Jan 2013, 16:47

Re: Kommentare zum OPSI PackageBuilder

Beitrag von pandel »

DAMN!!!!!!

@mirkt: could you please post YOUR test script with Lithuanian characters here, so that I can do this Save/Re-Open tests myself to sort this problem out. I think it is better to have your original test script than anything else I could come up with to test it...

BTW, you're right, the menu description for ctrl+s is still wrong, too. Gotta fix that asap...
mirkt
Beiträge: 95
Registriert: 05 Jun 2013, 09:39
Wohnort: Lithuania

Re: Kommentare zum OPSI PackageBuilder

Beitrag von mirkt »

http://sapnas.net/tmp/opsi/setup32.ins

it's just setup32.ins from template with:

Code: Alles auswählen

Message "1 ąčęėįšųūž 2 ĄČĘĖĮŠŲŽ 3 üäö 4"
I included several German characters as well :}
pandel
Beiträge: 830
Registriert: 25 Jan 2013, 16:47

Re: Kommentare zum OPSI PackageBuilder

Beitrag von pandel »

Many, many thanks! I try to find the problem as soon as possible ;)
Antworten