Ignore:
Timestamp:
Jun 9, 2016, 3:34:07 PM (3 years ago)
Author:
xuedongx
Message:

Support over UTF-16 representation of Unicode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/QA/greptest.py

    r5013 r5045  
    4343                        exit(-1)
    4444                outfpath = os.path.join(options.datafile_dir, filename)
    45                 outf = codecs.open(outfpath, encoding='utf-8', mode='w')
     45                if options.utf16: outf = codecs.open(outfpath, encoding='utf-16BE', mode='w')
     46                else: outf = codecs.open(outfpath, encoding='utf-8', mode='w')
    4647                in_datafile = True
    4748
     
    126127                          dest = 'verbose', action='store_true', default=False,
    127128                          help = 'verbose output: show successful tests')
     129        option_parser.add_option('-U', '--UTF-16',
     130                          dest = 'utf16', action='store_true', default=False,
     131                          help = 'test UTF-16 processing')
    128132        options, args = option_parser.parse_args(sys.argv[1:])
    129133        if len(args) != 1:
Note: See TracChangeset for help on using the changeset viewer.