QRCoder
QRCoder copied to clipboard
Adding TAB between strings
Type of issue
[ ] Bug
[X ] Question (e.g. about handling/usage)
[ ] Request for new feature/improvement
Expected Behavior
I'm looking to take 2 strings and put 2 TABs between the strings, then create the QR Code.
Current Behavior
I've tried string.Format("{0}{1}{1}{2}",string1,"\t",string2) and string.Format("{0}{1}{1}{2}",string1,(char)9,string2) but so far, it just scans without the TABs.
I found an online QR generator where I was able to create a QR Code that does have them. I am just not sure how to do it in QRCoder.
Steps to Reproduce (for bugs)
QRCodeData qrCodeData = qrGenerator.CreateQrCode(string.Format("{0}{1}{1}{2}", grade, "\t", value), QRCodeGenerator.ECCLevel.Q); var imgType = Base64QRCode.ImageType.Jpeg; Base64QRCode qrCode = new Base64QRCode(qrCodeData); return string.Format("data:image/{0};base64,{1}" , imgType.ToString().ToLower(), qrCode.GetGraphic(2, Color.Black, Color.White, true, imgType));
Your Environment
Below is the data used to create the correct QR code from an Online site.
@KayakFisher205 from the code that you wrote it doesn't look like it will work. Because of typos. In any case, please try to use a preformatted string.
string myString = string.Format("{0}{1}{1}{2}", grade, "\t", value); QRCodeGenerator qrGenerator = new QRCodeGenerator(); QRCodeData qrCodeData = qrGenerator.CreateQrCode(myString, QRCodeGenerator.ECCLevel.Q); QRCode qrCode = new QRCode(qrCodeData); Bitmap qrCodeImage = qrCode.GetGraphic(20);
Can't reproduce the problem. Tabs should be encoded. If this is still a thing, please re-open the issue @KayakFisher205 .