Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^4: Unicode vulgar fraction composition

by soonix (Canon)
on Oct 05, 2020 at 04:43 UTC ( #11122547=note: print w/replies, xml ) Need Help??


in reply to Re^3: Unicode vulgar fraction composition
in thread Unicode vulgar fraction composition

consider:
  • 123\N{FRACTION SLASH}8
  • 12\N{VULGAR FRACTION THREE EIGHTHS}
I would read the former as "one hundred twenty three eights", but the latter as "twelve (plus) three eights", so it's not completely a one-to-one relationship.

Replies are listed 'Best First'.
Re^5: Unicode vulgar fraction composition
by raygun (Scribe) on Oct 05, 2020 at 15:02 UTC

    Yes, my understanding is that's how Unicode would have you interpret each of those.

    So the problem then becomes that running NFKC on the latter produces the former: a nonequivalent string, therefore erroneous output. The correctly decomposed form of "12\N{VULGAR FRACTION THREE EIGHTHS}" would be, I presume, "12\N{ZERO WIDTH NON-JOINER}3\N{FRACTION SLASH}8". (Whether this is a bug or merely a "gotcha" in NFKC I suppose is a matter of interpretation.)

    But point taken that context matters when composing vulgar fractions.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11122547]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2021-10-25 05:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (89 votes). Check out past polls.

    Notices?