ISSUE-298: commas misinterpreted in MECARD N field

git-svn-id: https://zxing.googlecode.com/svn/trunk@1160 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2009-12-15 19:01:01 +00:00
parent 20ae03785b
commit 4b33ab2edb

View file

@ -71,6 +71,7 @@ public class ContactInfoGenerator implements GeneratorSource {
String email, String address, String address2, String memo) { String email, String address, String address2, String memo) {
StringBuilder output = new StringBuilder(); StringBuilder output = new StringBuilder();
output.append("MECARD:"); output.append("MECARD:");
name = name.replace(",", ""); // remove commas -- reserved char in MECARD
output.append("N:").append(name).append(';'); output.append("N:").append(name).append(';');
//maybeAppend(output, "ORG:", company); // Not standard; don't generate //maybeAppend(output, "ORG:", company); // Not standard; don't generate
maybeAppend(output, "TEL:", tel); maybeAppend(output, "TEL:", tel);