Open tfesenko opened 8 years ago
Heard back from Egill:
Thanks for quick responses, great service. It worked for me to set the default to UTF-8 and writing Icelandic letters even seems to work after that.
I'm still not sure what this means for us though: should we change the default encoding for Windows installation and possibly other platforms, and/or just recommend this as a workaround if users encounter the problem? Or is there a better solution?
Also, I assume we need to do something with exception handling so that users don't see repeated modal error messages whenever they type in the editor.
I've attached the problem source file here.
The problem looks like JSON only allows UTF encodings, the special character contain in the sample projects were encoded in iso-8859-1 which causes a parsing exception to be thrown.
I made the changes to force the parsing of swagger document using UTF-8 encoding.
I don't know what's the default file encoding in Eclipse for Windows, but we should encourage users to set it to UTF-8. This can be done in Eclipse > Preferences > General > Workspace > Text file encoding.
I suggest to limit the scope of this issue to the following: Do not show an error dialog, show a warning instead. When invalid sequences are encountered, create a warning to that effect. This might be difficult to address in SwagEdit, and may require changes to YEdit. Here I'm talking about invalid encodings, not invalid YAML or Swagger.
See https://github.com/RepreZen/SwagEdit/pull/160#issuecomment-235268673 for details
I will extract other parts, e.g. for contentTypes into other issues.
Modify API Studio to ensure that the workspace default encoding is always UTF-8 in our RCP product. Modify SwagEdit to check the workspace default encoding and offer some sort of warning dialog explaining the situation and offering to change the preference (should also have a "don't bother me about this again" checkbox).
Covered by Use UTF-8 as default content type for JSON, Xtend and RAPID-ML Files
Create a FAQ item explaining the issue and our recommended practice.
See [https://modelsolv.atlassian.net/browse/ZEN-2894](Create a FAQ item about encodings)
Removed the High Priority flag. The suggested improvements remaining to be completed are not high priority right now.
We have a Windows user who uses special characters (from Icelandic alphabet). The user reported the following error (see https://support.reprezen.com/helpdesk/tickets/133):
I was able to reproduce it on Mac. Note that original encoding is "iso-8859-1":
Also, the spec is invalid because the
host
is not specified:This has high priority