@section upgrade_occt760 Upgrade to OCCT 7.6.0
+@subsection upgrade_760_extendedstring_cout Output of TCollection_ExtendedString to stream
+
+Behavior of the method TCollection_ExtendedString::Print(Standard_OStream&) and corresponding operator << has changed.
+Previously it printed all Latin-1 symbols (those in range 0x80-0xff) as '\0' (effectively loosing them); symbols above 0xff were converted to hex representation (formatted like XML Numeric Character Reference).
+Now all symbols are sent to stream as UTF-8 byte sequences.
+Existing code relying on old behavior, if any, shall be rewritten.
+
@subsection upgrade_760_trimming_surface Trimming surface
Geom_RectangularTrimmedSurface sequentially trimming in U and V directions already no longer loses the first trim.
// ----------------------------------------------------------------------------
// Print
// ----------------------------------------------------------------------------
-void TCollection_ExtendedString::Print(Standard_OStream& astream) const
-{
- // ASCII symbols (including extended Ascii) are printed as is;
- // other Unicode characters are encoded as SGML numeric character references
- for (Standard_Integer i = 0 ; i < mylength ; i++) {
- Standard_ExtCharacter c = mystring[i];
- if ( IsAnAscii(c) )
- astream << ToCharacter(c);
- else
- astream << "&#" << c << ";";
+void TCollection_ExtendedString::Print (Standard_OStream& theStream) const
+{
+ if (mylength > 0)
+ {
+ const TCollection_AsciiString aUtf8 (mystring);
+ theStream << aUtf8;
}
}