Opened 12 years ago
Closed 12 years ago
#2234 closed defect (fixed)
Add UTF-8 conversion command to OMEdit
Reported by: | Martin Sjölund | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | high | Milestone: | 1.9.0 |
Component: | OMEdit | Version: | trunk |
Keywords: | Cc: | Peter Fritzson |
Description
- Select directory
- Choose source encoding
- OMEdit scans for all .mo-files and converts them to UTF-8
QTextStream in(&inFile); in.setCodec("Windows-1252"); // ... file.open(QIODevice::WriteOnly | QIODevice::Text); QTextStream out(&file); out.setCodec("UTF-8"); out.setGenerateByteOrderMark(false); out << str; file.close();
I suggest making it an option when opening files to convert them. And making a drop-down box using QTextCodec::availableCodecs(), instead of making the user input the encoding himself.
Note:
See TracTickets
for help on using tickets.
Added in r16304.