Thanks for that quick response. I've done some tests and can confirm that if I manually go into the VS File menu, Advanced Save Options, and set Encoding to Unicode ( UTF-8 with Signature) - Codepage 65001 and rebuild the app, it now works as expected.

I can also confirm that the working standard F# program already had this setting by default. So the problem is not with Websharper itself, or with VS itself, it's that the Websharper templates for VS are defaulting to Ansi encoding for the code files rather than Unicode.

I imagine this would be quite easy to fix...unless there was a deliberate good reason to have things the way they are, in whcih case I think the documentation should flag this issue and the workaround somewhere.

By on 4/22/2016 10:54 PM ()

This is a pretty weird issue. Here's what I found:

  • your last example seems to produce the right output on try.websharper,
  • it indeed produces the wrong output when run from VS,
  • if I change the encoding of the file to UTF8 in some other editor the application will correctly output the string "rásé" but it shows up as "rás\u00e9" in the VS editor.

So it seems to be an issue with character encoding rather than WebSharper to me.

By on 4/22/2016 6:21 AM ()

Well, it may be in WebSharper itself actually. If you write "rásé" VS will still save it as an ANSI encoded file but as soon as I insert a unicode character and VS interprets and saves the file as such, it's working. I.e. the string "ráséӘ" will be rendered correctly.

By on 4/22/2016 6:36 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper