mirror of
https://git.code.sf.net/p/zint/code
synced 2025-06-02 16:09:51 -04:00
Improved Kanji support - Now converts from Unicode to Shift JIS
This commit is contained in:
parent
2262c365c4
commit
de4f39782f
7 changed files with 6977 additions and 5 deletions
|
@ -86,7 +86,8 @@ void usage(void)
|
|||
" --mode=NUMBER (Maxicode and Composite) Set encoding mode.\n"
|
||||
" --null=NUMBER Character to represent NULL.\n"
|
||||
" --gs1 Treat input as GS1 data\n"
|
||||
" --kanji Treat input as Kanji characters\n"
|
||||
" --kanji Treat input as Kanji characters in Unicode\n"
|
||||
" --sjis Treat input as Shift-JIS\n"
|
||||
, ZINT_VERSION);
|
||||
}
|
||||
|
||||
|
@ -162,6 +163,7 @@ int main(int argc, char **argv)
|
|||
{"null=", 1, 0, 0},
|
||||
{"gs1", 0, 0, 0},
|
||||
{"kanji", 0, 0, 0},
|
||||
{"sjis", 0, 0, 0},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
c = getopt_long(argc, argv, "htb:w:d:o:i:rcmp", long_options, &option_index);
|
||||
|
@ -189,6 +191,9 @@ int main(int argc, char **argv)
|
|||
if(!strcmp(long_options[option_index].name, "kanji")) {
|
||||
my_symbol->input_mode = KANJI_MODE;
|
||||
}
|
||||
if(!strcmp(long_options[option_index].name, "sjis")) {
|
||||
my_symbol->input_mode = SJIS_MODE;
|
||||
}
|
||||
if(!strcmp(long_options[option_index].name, "fg=")) {
|
||||
strncpy(my_symbol->fgcolour, optarg, 7);
|
||||
}
|
||||
|
|
|
@ -182,6 +182,9 @@ echo testing QR Code
|
|||
./zint -o bar58.png -b 58 --border=10 -d "Demonstration QR Code symbol generated by libzint"
|
||||
./zint -o bar58.eps -b 58 --border=10 -d "Demonstration QR Code symbol generated by libzint"
|
||||
./zint -o bar58.svg -b 58 --border=10 -d "Demonstration QR Code symbol generated by libzint"
|
||||
./zint -o bar58k.png -b 58 --kanji --border=10 -d "登録商標です。"
|
||||
./zint -o bar58k.eps -b 58 --kanji --border=10 -d "登録商標です。"
|
||||
./zint -o bar58k.svg -b 58 --kanji --border=10 -d "登録商標です。"
|
||||
echo testing Code 128 Subset B
|
||||
./zint -o bar60.png -b 60 --height=50 --border=10 -d 87654321
|
||||
./zint -o bar60.eps -b 60 --height=50 --border=10 -d 87654321
|
||||
|
@ -276,7 +279,6 @@ echo testing Micro PDF417
|
|||
./zint -o bar84.png -b 84 --border=10 -d "Demonstration MicroPDF417 symbol generated by libzint"
|
||||
./zint -o bar84.eps -b 84 --border=10 -d "Demonstration MicroPDF417 symbol generated by libzint"
|
||||
./zint -o bar84.svg -b 84 --border=10 -d "Demonstration MicroPDF417 symbol generated by libzint"
|
||||
./zint -o bar84k.png -b 84 --border=10 -d "QR コードはデンソーウェーブの登録商標です。"
|
||||
echo testing USPS OneCode 4-State Customer Barcode
|
||||
./zint -o bar85.png -b 85 --border=10 -d 01234567094987654321
|
||||
./zint -o bar85.eps -b 85 --border=10 -d 01234567094987654321
|
||||
|
@ -312,6 +314,9 @@ echo testing Micro QR Code
|
|||
./zint -o bar97.png -b 97 --border=10 -d "MicroQR Code"
|
||||
./zint -o bar97.eps -b 97 --border=10 -d "MicroQR Code"
|
||||
./zint -o bar97.svg -b 97 --border=10 -d "MicroQR Code"
|
||||
./zint -o bar97k.png -b 97 --kanji --border=10 -d "登録商標です。"
|
||||
./zint -o bar97k.eps -b 97 --kanji --border=10 -d "登録商標です。"
|
||||
./zint -o bar97k.svg -b 97 --kanji --border=10 -d "登録商標です。"
|
||||
echo testing HIBC LIC 128
|
||||
./zint -o bar98.png -b 98 --border=10 -d "A99912345/9901510X3"
|
||||
./zint -o bar98.eps -b 98 --border=10 -d "A99912345/9901510X3"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue