Parse a Unicode vulgar fraction

Raku, 17 bytes

{S!\⅟!1/!.EVAL}

Try it online!

Returns a rational number type. Raku actually natively supports unicode literals and operators, though it doesn't do , so we need to substitute for that. Also, division by zero won't cause an error, but returns a value that causes an Exception when you try to use or print it.


PHP, 80 bytes

preg_match("~(\d+)/ ?(\d+)~",iconv('','US//TRANSLIT',$argn),$m);echo$m[1]/$m[2];

Try it online!

Just letting iconv do all the work for us ^^ this time PHP is competitive :O


JavaScript (ES6),  125 120  106 bytes

s=>([n,d]=s.split(/\D/),d)?(n||1)/d:'131111121234151357'[i=s.charCodeAt()%63%20]/-~'133689224444557777'[i]

Try it online!