User forums > General (but related to Code::Blocks)
Linux file save permission bug
Jenna:
Then it should perhaps get removed or commented out.
Jenna:
--- Quote from: Biplab on April 07, 2008, 06:35:21 pm ---The Save() function without BOM should not be used at all. :)
--- End quote ---
It is used by tinyXML in base/tinyxml/tinywxuni.cpp in line 54.
Biplab:
--- Quote from: jens on April 08, 2008, 08:32:35 am ---
--- Quote from: Biplab on April 07, 2008, 06:35:21 pm ---The Save() function without BOM should not be used at all. :)
--- End quote ---
It is used by tinyXML in base/tinyxml/tinywxuni.cpp in line 54.
--- End quote ---
The main difference is that the Save() function which accepts wxString and BOM is able to convert & save correctly to Multi-byte encoded file. So if anyone wishes to save a file beyond 1-byte encoding, (s)he needs to use the newer one. Older one may be used to save any files with 1-byte encoding.
AFAIK, the call inside TinyXML is used to save C::B's project files, layout files, etc. They are saved as UTF-8 which the old one is able to handle. It should also be replaced with the newer one.
Actually while the Unicode handling portion of C::B was updated, the api changes were reflected in core items. Now I see I've missed one. :)
Biplab:
@Thomas,
What do you think about the patch? Shall I clean it up and go ahead to commit??
thomas:
Looking at the last version of that patch, I don't think it'll be 100% good. For example, the "keep the backup file" bit will keep it renamed as tempfile, if I read the patch correctly. The Windows-specific workaround for the broken readonly flag is now enabled on all platforms, which doesn't do much harm, but I don't understand what it's for :)
Also, I'm not sure if copy-write-replace can cope with rename-write-replace performance-wise. I'm not sure about that BOM story and tinyxml either. It may be that I just chose "non-BOM" back in the old days because it wasn't needed, or it may be that there was a problem, I don't remember... so long ago. You must be sure that this doesn't break project files and config files (so please test before changing that).
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version