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

Non-latin (accented) characters support #10

Open
mininao opened this issue Jul 8, 2014 · 4 comments
Open

Non-latin (accented) characters support #10

mininao opened this issue Jul 8, 2014 · 4 comments

Comments

@mininao
Copy link

mininao commented Jul 8, 2014

The module doesnt seem to support accented characters (é è à â û î ô ù ï etc ...) and returns interrogation marks when an accented character is entered.

Is there any way to solve this ?

Problematic code :

var prompt = require('sync-prompt').prompt;
console.log( prompt( 'Enter some accents ' ) );

Result :
capture

My configuration
Windows 7 64 bits
Compilation with Visual Studio 2010
node.js version 0.10.29

@shovon
Copy link
Owner

shovon commented Jul 11, 2014

If I understand correctly, I think the issue here is that Windows uses a different character encoding. While Linux (and other *nix OS) use UTF-8, windows uses UTF-16.

I'll try to get it working. Ugh, I'll have to get my hands on a Windows OS.

Or... maybe you can issue a pull request. :)

@mininao
Copy link
Author

mininao commented Jul 11, 2014

I'll try to see what i can do but since i have no knowlege of C... my chances of suceeding will be limited ^^
I would be so happy to work on *nix but since my workplace is into the full-microsoft thing, i have no choice 👎

Anyway, thank you for your fast answer, your module is a lifesaver ;)

@shovon
Copy link
Owner

shovon commented Jul 12, 2014

As I commented on #11, I might be converting a lot of the C++ code into JavaScript.

I'm hoping not only will it fix #11, but it will somehow manage to fix this issue.

@mininao I just want to test something. Could you run the following code, in Node.js, and see what it outputs?

console.log('Émil va à son école');

@mininao
Copy link
Author

mininao commented Jul 13, 2014

I have not access to a computer right now, but I'm sure it will output the accents correctly, like "Émile va à son école"
On dim., juil. 13, 2014 at 1:51 AM, Salehen Shovon Rahman notifications@github.com wrote:As I commented on #11, I might be converting a lot of the C++ code into JavaScript.

I'm hoping not only will it fix #11, but it will somehow manage to fix this issue.

I just want to test something. Could you run the following code in, Node.js, and see what it outputs?

console.log('Émil va à son école');

—Reply to this email directly or view it on GitHub.

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