sogo
sogo copied to clipboard
(fix) NSString+Utilities: Fix safeStringByEscapingXMLString on gnuste…
…p-base-1.28
Newer gnustep version would add a byte-order-mark on NSString:dataUsingEncoding:NSUTF32StringEncoding, use NSUTF32LittleEndianStringEncoding instead to skip the BOM.
Fixes #5416
Thanks for spotting the issue. The fix looks great for little-endian systems, but just to be really safe we should probably support big endian machines too (even though I'm not aware of any modern machines using a big endian architecture). The GSConfig.h file defines the preprocessor macro GS_WORDS_BIGENDIAN as 1 or 0 to let us make the code handle both cases.
Thanks for the feedback. Howver, I think that should be separate bug, then. there are multiple uses of NSUTF32LittleEndianStringEncoding
(e.g. safeString
). I'd rather have this fixed asap, and then someone can invest more time for obscure architectures.
Any plans to merge this fix in the near future?
Hi team,
Thank you for your contribution to the project.
I agree with @the-nic, as this parameter is used in other code parts, this should not be a new issue. I opened a new ticket for Big endian support : https://bugs.sogo.nu/view.php?id=5615
Sebastien