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

ECMA-48 detection bug #38

Closed
regentov opened this Issue Mar 13, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@regentov

regentov commented Mar 13, 2017

test/example_files/ecma-48.txt says:
The start of the file MUST begin with an ECMA-48 escape sequence.

Could not find the requirement in standard (http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf)

Moreover, if the file does not begin with an escape sequence, there is no way to view it coloured in RetroTxt.

Steps to reproduce: erase the first �[0; from test/example_files/ecma-48.txt and see the ugly unformatted text.

Correct behaviour: There should be some way to force ECMA-48 coloring of the file that does not begin with an escape sequence.

@bengarrett bengarrett self-assigned this Mar 13, 2017

@bengarrett bengarrett added the bug label Mar 13, 2017

@bengarrett bengarrett added this to the Immediate milestone Mar 13, 2017

@bengarrett bengarrett changed the title from Way to force ECMA-48 encoding to ECMA-48 detection bug Mar 13, 2017

@bengarrett

This comment has been minimized.

Show comment
Hide comment
@bengarrett

bengarrett Mar 13, 2017

Owner

Hi the ecma-48 text stating that requirement is incorrect. There is actually a bug with the ECMA-48 detection.

Line 283 in functions.js has whitespace that shouldn't be there.

c = s.indexOf(`${String.fromCharCode(27)} ${String.fromCharCode(91)} `)

needs to be

c = s.indexOf(`${String.fromCharCode(27)}${String.fromCharCode(91)}`)
Owner

bengarrett commented Mar 13, 2017

Hi the ecma-48 text stating that requirement is incorrect. There is actually a bug with the ECMA-48 detection.

Line 283 in functions.js has whitespace that shouldn't be there.

c = s.indexOf(`${String.fromCharCode(27)} ${String.fromCharCode(91)} `)

needs to be

c = s.indexOf(`${String.fromCharCode(27)}${String.fromCharCode(91)}`)

bengarrett pushed a commit that referenced this issue Mar 13, 2017

Ben Garrett
Version 2.1.7
Fixed issue #38, ECMA-48 detection issue.
@bengarrett

This comment has been minimized.

Show comment
Hide comment
@bengarrett

bengarrett Mar 13, 2017

Owner

@regentov Thanks for letting me know about this bug! It has been fixed and submitted to the Chrome store.

Owner

bengarrett commented Mar 13, 2017

@regentov Thanks for letting me know about this bug! It has been fixed and submitted to the Chrome store.

@bengarrett bengarrett closed this Mar 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment