~ubuntu-branches/debian/sid/gdal/sid

« back to all changes in this revision

Viewing changes to ogr/ogrsf_frmts/gml/trstring.cpp

  • Committer: Package Import Robot
  • Author(s): Francesco Paolo Lovergine
  • Date: 2012-05-07 15:04:42 UTC
  • mfrom: (5.5.16 experimental)
  • Revision ID: package-import@ubuntu.com-20120507150442-2eks97loeh6rq005
Tags: 1.9.0-1
* Ready for sid, starting transition.
* All symfiles updated to latest builds.
* Added dh_numpy call in debian/rules to depend on numpy ABI.
* Policy bumped to 3.9.3, no changes required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/******************************************************************************
2
 
 * $Id: trstring.cpp 16785 2009-04-17 10:07:28Z chaitanya $
 
2
 * $Id: trstring.cpp 22205 2011-04-18 21:17:30Z rouault $
3
3
 *
4
4
 * Project:  GML Reader
5
5
 * Purpose:  Functions for translating back and forth between XMLCh and char.
30
30
 * DEALINGS IN THE SOFTWARE.
31
31
 ****************************************************************************/
32
32
 
 
33
#ifdef HAVE_XERCES
 
34
 
33
35
#include "gmlreaderp.h"
34
36
#include "cpl_vsi.h"
35
37
#include "cpl_conv.h"
129
131
    int i;
130
132
    wchar_t *pwszUTF16;
131
133
 
132
 
    pwszUTF16 = CPLRecodeToWChar( pszCString, CPL_ENC_UTF8, CPL_ENC_UTF16 );
 
134
    pwszUTF16 = CPLRecodeToWChar( pszCString, CPL_ENC_UTF8, "WCHAR_T" );
133
135
    
134
136
    for( i = 0; pwszUTF16[i] != 0; i++ )
135
137
        panXMLString[i] = pwszUTF16[i];
178
180
    pwszSource[i] = 0;
179
181
    
180
182
    char *pszResult = CPLRecodeFromWChar( pwszSource, 
181
 
                                          CPL_ENC_UTF16, CPL_ENC_UTF8 );
 
183
                                          "WCHAR_T", CPL_ENC_UTF8 );
182
184
    
183
185
    strcpy( pszCString, pszResult );
184
186
 
230
232
    tr_strcpy( pszResult, panXMLString );
231
233
    return pszResult;
232
234
}
 
235
 
 
236
#endif // HAVE_XERCES