如何将byte []编码为ISO / IEC 8859-1以实现有效的QR码使用?

时间:2014-07-24 14:52:02

标签: javascript .net unicode qr-code iso-8859-1

我有一个字节[],我需要嵌入QR码。据我所知,唯一广泛采用的编码是ISO / IEC 8859-1。

我想我可以清除this old project of mine以将二进制值映射到相关的ISO字符。然后我可以将它传递给我最喜欢的QR编码器并创建图像。

这是一种合理的方法吗?是否有Javascript库来处理解码(逆转.NET项目的作用)

编辑:这是我必须编码的数据:

TOKEN {
"uidp":"c2FtcGxlIHJldm9jYXRpb24gaXNzdWVy",
"h":"BObbPeFd2XQZd7EJKhB1x\/Tdc2u9lcjpJYfhqa16z3yXSLFbzUurOV6\/83Tq499dhw6XEKFTBftmaQe+OXevwGk=",
"szp":"BBLJgzgFiJ0P8PUZdvCPlu8oyHYcCBpPkKKKlga33LOWOboLxQLf\/DBen2cDusWiifNwVEn5ev7Pr\/zEBZdoLis=",
"scp":"ctsCqIkJHAYw2qjlvzpE2HH0m8rOJTKJFv9RKPPMu6s=",
"srp":"QhSXSTgnaH\/WiON1YhvugklIgzl6aBprs1puVMMdJBc=","d":false}

Proof {"D":[],
"a":"v+YFX+Gtol8Fgt8acdz0hVNfa36o+PLo6Ybt7N6v6UI=",
"r":["JzYaNRnGm+c6cszvaCv3Y+bozepVV4EcVean+UxuApU=",
"h\/MfKC327MeZCKmzXeOYqsd2j6wGIlqV\/n+sNfg1z6o="],
"tc":["BJsQvPiycJs1yZQ6lFKd66vFV40HQ1jWOFEpSCfCxOt7bCxghSxk1JH\/Q7m0gaoXrJNxa8vvEyCJeB4DtWYXE2I="],
"ta":["m5n0MPSBhhvkc2sposGkKNswyc2XxAdqMGLBMd0w\/rU="],
"tr":["W31kbeJfFo\/cgvKBheCvuMioeFUsL5WWgImduanjTuo="]}

这是另外一个很好的数据

Revoke {"cPrime":"TJvtm1009we21ShdiUPg09HDzTHn9TOrraPikmvI3zg=","s":["SkYYaToNdf0u1y8XNxXsQRXQjx03WVcoxVzrcVkEUb0=",
 "7F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