Skip to content

Unexpected  character #104

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

Closed
nathan-wells opened this issue Jul 19, 2018 · 9 comments
Closed

Unexpected  character #104

nathan-wells opened this issue Jul 19, 2018 · 9 comments

Comments

@nathan-wells
Copy link

When codemirror field is empty, it appears as if it contains the "Â" character. Then when entering text, the same character appears after the pipe as part of the cursor.

@mngmattng
Copy link

Hi! I am also experiencing this issue. I am unsure if it's a codemirror or react-codemirror2 issue.
I also see this issue when there is an empty new line.
screen shot 2018-07-20 at 10 57 11 am

If anyone has an workarounds or solutions. I would love to hear it!

@scniro
Copy link
Owner

scniro commented Jul 20, 2018

@nathan-wells @Locatus Hey! Thanks for opening this. Unfortunately this is the first I've heard or seen this. Unable to reproduce on my end. Can you share some specs with me? (OS, browser, versions, etc). Also one thing does stick out right away, is there a weird doctype going in your webapp? I've seen this randomly before with different but similar weird characters and the issue boiled down to some old/weird doctype (or similar doc meta) being the culprit. Perhaps we can find something in common amongst you both.

@mngmattng
Copy link

Hi @scniro - Thanks for the quick response.

Quick info:
package.json: codemirror = 5.39.0. react-codemirror2=5.1.0
OS: Seen on Linux, macOS, and windows
Browser: Seen on firefox (linux), chrome (windows, macOS), and safari (macOS)

Interesting fact:
Do not see the issue when running my app through npm start (webpack), but see it when the app is built for tomcat.

I hope that was helpful. Let me know if you require any more info.

@scniro
Copy link
Owner

scniro commented Jul 20, 2018

@Locatus interesting so I suspect the issue might have something to do with how webpack is bundling. Excuse me for being terribly oblivious here but I'm not at all familiar with what's all involved to build for tomcat. Is there a special process or version of node that webpack has to run on?

@mngmattng
Copy link

I'm curious to know if the same scenario is happening for @nathan-wells. I'm going to start digging through what's different between the two. As well check into the doctype.

@scniro
Copy link
Owner

scniro commented Jul 20, 2018

@Locatus cool let me know what you find. I stumbled across this and wonder if this could trigger any ideas? angular/angular-cli#2077 Looks like they are seeing some issues with files not encoding correctly

@nathan-wells
Copy link
Author

Package version: 4.3.0
OS: Windows 7
Browsers: Chrome & IE

I'm also using webpack and don't see the issue when running my app locally.

As far as doctype, I'm using <!doctype html>.

@scniro
Copy link
Owner

scniro commented Jul 20, 2018

@Locatus @nathan-wells behold...

codemirror/codemirror5#5288

@nathan-wells
Copy link
Author

nathan-wells commented Jul 20, 2018

The fix on my end was to update index.html to specify a utf-8 charset:
<script src="./bundle.js" charset="utf-8"></script>

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

3 participants