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

Unicode compatibility #14

Open
hhaensel opened this issue Jan 22, 2020 · 4 comments
Open

Unicode compatibility #14

hhaensel opened this issue Jan 22, 2020 · 4 comments

Comments

@hhaensel
Copy link
Contributor

There are (at least) two cases where unicode characters in f"..." expressions currently fail due to index arithmetics:

  • directly preceeding format expressions
  • at the end of the f"..." expression

Replacing index arithmetics by prevind() and nextind(), e.g. j-1 => prevind(s, j), would solve the problem.

StrLiterals has the same problem, and I have already submitted a PR. I also have version for StringLiterals at hand if you are interested ;-)
But you indicated that you are going to no longer support StringLiterals ...

Two expressions which currently fail:

@test f"π(22)" == "π4"
@test f"π = (2
90)°" == "π = 180°"

@ScottPJones
Copy link
Member

I don't understand this - why should there be any transformation?
f"π(22)" should be simply "π(22)", not "π4"

@ScottPJones
Copy link
Member

All interpolations (and formatting) sequences must start with a '' (backslash).

@Socob
Copy link

Socob commented May 17, 2023

The issue description (and @ScottPJones’ comment) is suffering from some broken Markdown formatting due to the backslashes and asterisks. The intended expressions are

@test f"π\(2*2)" == "π4"
@test f"π = \(2*90)°" == "π = 180°"

Although not sure if it matters at this point since it seems that this package hasn’t been developed for a long time now.

@ScottPJones
Copy link
Member

StringLiterals has been replaced by StrLiterals, and this bug was fixed there.

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