Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors Loading UTF-8 formatted files via Chrome App #255

Closed
MaBecker opened this issue Sep 2, 2021 · 5 comments
Closed

Errors Loading UTF-8 formatted files via Chrome App #255

MaBecker opened this issue Sep 2, 2021 · 5 comments

Comments

@MaBecker
Copy link

MaBecker commented Sep 2, 2021

External editor

Bildschirmfoto 2021-09-02 um 11 08 14

WebIDE - Chrome App, v0.75.8

Bildschirmfoto 2021-09-02 um 11 08 31

WebIDE - https://www.espruino.com/ide/
Bildschirmfoto 2021-09-02 um 12 11 51

Sample text

umlauts.js.txt

More infos: http://forum.espruino.com/comments/16077675/

Any idea how to handle this?

@MaBecker
Copy link
Author

MaBecker commented Sep 2, 2021

possible workaround .....

Bildschirmfoto 2021-09-02 um 12 42 39

@gfwilliams
Copy link
Member

If I:

  • Load the file in Chrome App under Linux: works
  • Load the file in espruino.com/ide: same issue you see for online IDE
  • Copy/paste the file in online IDE: works

image

Does it work for you when you copy/paste?

At least for espruino.com/ide the root cause is that your file is actuallt a UTF8 text file. It actually contains those extra characters that you see. If you upload the attached (non-UTF8) file then it may actually work for you?

umlauts2.js.txt

So I guess we need to detect UTF8 files somehow and convert them? I don't know if this is something the Web Browser would actually handle automatically

@MaBecker
Copy link
Author

MaBecker commented Sep 2, 2021

Does it work for you when you copy/paste?

Yes copy paste works

If you upload the attached (non-UTF8) file then it may actually work for you?

Yes it does

Just checking Sublime settings

	// The encoding to use when the encoding can't be determined automatically.
	// ASCII, UTF-8 and UTF-16 encodings will be automatically detected.
	"fallback_encoding": "Western (Windows 1252)",

	// Encoding used when saving new files, and files opened with an undefined
	// encoding (e.g., plain ascii files). If a file is opened with a specific
	// encoding (either detected or given explicitly), this setting will be
	// ignored, and the file will be saved with the encoding it was opened
	// with.
	"default_encoding": "UTF-8",

So saving the files as non-UTF-8 does the trick - Many thanks!

@gfwilliams gfwilliams changed the title WebIDE and umlauts written in extermal Errors Loading UTF-8 formatted files Sep 2, 2021
@gfwilliams
Copy link
Member

Renamed - and lets leave this open. Ideally the IDE would be able to load UTF8 and convert it either way.

Lets ignore the Chrome App for now as at some point Google are still planning to kill it.

@gfwilliams gfwilliams changed the title Errors Loading UTF-8 formatted files Errors Loading UTF-8 formatted files via Chrome App Oct 25, 2021
@gfwilliams
Copy link
Member

Fixed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants