(path, encoding, errors="replace")
| 45 | |
| 46 | """ read unicode string from encoded file """ |
| 47 | def readFile(path, encoding, errors="replace"): |
| 48 | raw = open(path, 'rb').read() |
| 49 | uniText = raw.decode(encoding, errors) |
| 50 | return uniText |
| 51 | |
| 52 | """ write unicode string to encoded file """ |
| 53 | def writeFile(path, uniText, encoding, errors="replace"): |