#669334 ascii2uni -a U byte injection

Package:
uni2ascii
Source:
uni2ascii
Description:
UTF-8 to 7-bit ASCII and vice versa converter
Submitter:
Date:
2021-02-01 02:39:05 UTC
Severity:
normal
#669334#5
Date:
2012-04-19 06:41:05 UTC
From:
To:
Where in the world is the mysterious injection of c2 and c3 documented?!
$ echo -n '\u00e6\u0088\u0091\u00e5\u0092\u008c'|ascii2uni -a U|od -t x1
6 tokens converted
0000000 c3 a6 c2 88 c2 91 c3 a5 c2 92 c2 8c 0a
0000015

I had to do
$ echo -n '\u00e6\u0088\u0091\u00e5\u0092\u008c'|sed 's/\\u00/%/g'|ascii2uni -a J|tee /dev/stderr|od -t x1
6 tokens converted
我和
0000000 e6 88 91 e5 92 8c 0a
0000007

#669334#10
Date:
2020-02-05 16:40:00 UTC
From:
To:
There is a bug here:

echo -n 'const t.\u0275fac=1;' | ascii2uni -a U
const t.=1;
1 token converted

The "fac" is been stripped.

#669334#15
Date:
2020-03-01 05:56:07 UTC
From:
To:
Hmm, thanks for letting me know. I will have a look.

Bill

#669334#20
Date:
2021-02-01 02:35:10 UTC
From:
To:
Hi Bill,

I can use the following command arguments to solve the problem.

*echo -n 'const t.\u0275fac=1;' | ascii2uni -Z '\u%04X'*


But I think the *-a U* still buggy.


Bill Poser <billposer2@gmail.com> 於 2020年3月1日 週日 下午1:56寫道: