Sometimes UTF symbols in the source files get corrupted

Bug #1427183 reported by Danil Sokolov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Workcraft
Fix Committed
High
Danil Sokolov

Bug Description

Special symbols inserted in the source code, e.g. strings with Greek letters or arrows, are sometimes corrupted after branch merge. This is most likely due to some of the developers having non-UTF encoding in their editors.

A safer option is to avoid inserting UTF symbols directly in the source code and use hexadecimal values to represent these symbols instead, e.g.:
 // Infinity symbol in UTF-8 encoding
 public static final char INFINITY_SYMBOL = 0x221E;
 // Right arrow symbol in UTF-8 encoding
 public static final char RIGHT_ARROW_SYMBOL = 0x2192;
 // Epsilon symbol in UTF-8 encoding
 public static final char EPSILON_SYMBOL = 0x03B5;

When needed, these characters can be converted to string using Character.toString method.

Tags: ui

Related branches

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.