| OLD | NEW |
| (Empty) |
| 1 #!/usr/bin/env python | |
| 2 # coding=utf-8 | |
| 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 4 # Use of this source code is governed by a BSD-style license that can be | |
| 5 # found in the LICENSE file. | |
| 6 | |
| 7 import sys | |
| 8 | |
| 9 | |
| 10 def main(): | |
| 11 """Creates a file name with whitespaces and comma in it.""" | |
| 12 # We could test ?><:*|"' and chr(1 to 32) on linux. | |
| 13 # We could test ?<>*|"' on OSX. | |
| 14 # On Windows, skip the Chinese characters for now as the log parsing code is | |
| 15 # using the current code page to generate the log. | |
| 16 if sys.platform == 'win32': | |
| 17 filename = u'foo, bar, ~p#o,,ué^t%t .txt' | |
| 18 else: | |
| 19 filename = u'foo, bar, ~p#o,,ué^t%t 和平.txt' | |
| 20 with open(filename, 'w') as f: | |
| 21 f.write('Bingo!') | |
| 22 return 0 | |
| 23 | |
| 24 | |
| 25 if __name__ == '__main__': | |
| 26 sys.exit(main()) | |
| OLD | NEW |