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

Scanf.sscanf "%S" doesn't handle "\\xff" #4923

Closed
vicuna opened this issue Nov 17, 2009 · 2 comments

Comments

Projects
None yet
2 participants
@vicuna
Copy link

commented Nov 17, 2009

Original bug ID: 4923
Reporter: gildor
Assigned to: @pierreweis
Status: closed (set by @pierreweis on 2009-11-19T10:25:19Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 3.11.1
Fixed in version: 3.11.2+dev
Category: ~DO NOT USE (was: OCaml general)

Bug description

The string "\xff" is valid, but cannot be parsed using Scanf.sscanf.

Step to reproduce:

Scanf.sscanf ""\xef\xbb\xbf"" "%S" (fun s -> s);;

Exception: Scanf.Scan_failure "scanf: bad input at char number 2: x".

Regards
Sylvain Le Gall

@vicuna

This comment has been minimized.

Copy link
Author

commented Nov 19, 2009

Comment author: @pierreweis

Thank you for the bug report: indeed the \x notation was not yet implemented in Scanf.

@vicuna

This comment has been minimized.

Copy link
Author

commented Nov 19, 2009

Comment author: @pierreweis

The fix will be available in the forthcoming 3.11.2 release.

@vicuna vicuna closed this Nov 19, 2009

@vicuna vicuna added the bug label Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.