Locale/Encodings/HTML

I have had some success on the Mac side with foreign languages working with my App but it doesn’t follow on the Windows side when I save the .html file out.

  • Set language to French
  • Create a file with textout.Encoding = Encodings.UTF8
  • Load in Safari works
  • Load in Edge shows incorrect characters where the language special characters are
    eg Bien habillé

ignoring the html file I am writing out. Is

textout.Encoding = Encodings.UTF8

The right encodings for Windows?

You also need to use ConvertEncoding function to make sure the text you write has that encoding.

[quote=477321:@Martin Fitzgibbons]ignoring the html file I am writing out. Is

textout.Encoding = Encodings.UTF8

The right encodings for Windows?[/quote]

Depends what you do. For certain uses, Windows uses encodings.WindowsANSI.

If you want to be able to display special (non ASCII) characters in a html file, put in the <head> block (before <title>):

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">