1 ///////////////////////////////////////////////////////////////////////////////
2 // Copyright (c) 2000-2014 Ericsson Telecom AB
3 // All rights reserved. This program and the accompanying materials
4 // are made available under the terms of the Eclipse Public License v1.0
5 // which accompanies this distribution, and is available at
6 // http://www.eclipse.org/legal/epl-v10.html
7 ///////////////////////////////////////////////////////////////////////////////
15 UNIVERSAL_CHARSTRING
flatten(UNIVERSAL_CHARSTRING
const& par
) {
17 const int max
= par
.lengthof();
18 for (int i
= 0; i
< max
; ++i
) {
19 universal_char uc
= par
[i
].get_uchar();
20 //if ( !uc.uc_group && !uc.uc_plane && !uc.uc_row && isprint(uc.uc_cell))
22 // Drop characters which are in 0000-00FF and unprintable
23 if ( uc
.uc_group
|| uc
.uc_plane
|| uc
.uc_row
|| isprint(uc
.uc_cell
))
25 buf
.put_s(4, (const unsigned char*)&uc
);
28 buf
.put_s(4, (const unsigned char*)"\0\0\0\n");
30 UNIVERSAL_CHARSTRING retval
;
31 buf
.get_string(retval
);