German umlaut problems after converting utf-8 -> ascii

This forum is user-to-user based and not regularly monitored by IDM.
Please see the note at the top of this page on how to contact IDM.

German umlaut problems after converting utf-8 -> ascii

Postby grifter » Sun Dec 04, 2005 4:11 am

Hi,

I'm using UE 11.00a+ and working with some utf-8 files here.

after converting these files from utf-8 to ascii, the characters that are already in the file are converted correctly, but when i add new German umlauts, they are displayed as 'öäü' instead of 'öäü'. Seems like they are still written as utf-8 characters in the ascii file ...

The strange thing is, when i save the file and re-open it, everything is fine again.

Anybody know how to fix that?
Regards
User avatar
grifter
Newbie
 
Posts: 4
Joined: Mon Oct 24, 2005 11:00 pm

Re: German umlaut problems after converting utf-8 -> ascii

Postby Mofi » Sun Dec 04, 2005 1:02 pm

Many problems with UTF-8 are fixed in the last versions. So I suggest first to update to v11.20a. It's free for owners of a registration code for v11.xx. But the specific problem you describe still exists in v11.20a. Please write a bug report by email to IDM support.

Workaround: After converting the file from utf-8 to ascii (and removing meta line with "charset=utf-8" if it is a html file and exists) save the file and use the "Revert to Saved" feature from the File menu to reopen it now as ASCII file.

You can also use this macro for that job:

Save
Clipboard 9
CopyFilePath
CloseFile
Open "^c"
ClearClipboard
Clipboard 0

You can add a regular expression replace to this macro before save to delete the charset meta line. But still not available as macro command is the conversion from utf-8 to ascii.

Of course I do not have these problems, because I use following autoloaded macros for German special characters. One macro for every character with the appropriate German character key as macro hotkey.

Example: macro for lower case 'ä'

IfExtIs "html"
"ä"
ExitMacro
EndIf
IfExtIs "htm"
"ä"
ExitMacro
EndIf
IfExtIs "c"
"ae"
ExitMacro
EndIf
IfExtIs "h"
"ae"
ExitMacro
EndIf
IfExtIs "inc"
"ae"
ExitMacro
EndIf
IfExtIs "asm"
"ae"
ExitMacro
EndIf
"ä"
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4062
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: German umlaut problems after converting utf-8 -> ascii

Postby grifter » Sun Dec 04, 2005 5:36 pm

Thanks a lot!
User avatar
grifter
Newbie
 
Posts: 4
Joined: Mon Oct 24, 2005 11:00 pm


Return to UltraEdit General Discussion