German umlaut problems after converting UTF-8 to ASCII

German umlaut problems after converting UTF-8 to ASCII

4
NewbieNewbie
4

    Dec 04, 2005#1

    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

    6,675585
    Grand MasterGrand Master
    6,675585

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

      Dec 04, 2005#2

      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 an 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:

      Code: Select all

      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 auto-loaded macros for German special characters. One macro for every character with the appropriate German character key as macro hotkey.

      Example: Macro for lower case 'ä'

      Code: Select all

      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
      "ä"
      
      Best regards from an UC/UE/UES for Windows user from Austria

      4
      NewbieNewbie
      4

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

        Dec 04, 2005#3

        Thanks a lot!