File tree Expand file tree Collapse file tree 1 file changed +27
-27
lines changed Expand file tree Collapse file tree 1 file changed +27
-27
lines changed Original file line number Diff line number Diff line change @@ -360,37 +360,37 @@ namespace Rcpp {
360
360
}
361
361
362
362
inline const char * get_encoding () const {
363
- switch (enc) {
364
- case CE_BYTES:
365
- return " bytes" ;
366
- case CE_LATIN1:
367
- return " latin1" ;
368
- case CE_UTF8:
369
- return " UTF-8" ;
370
- default :
371
- return " unknown" ;
372
- }
373
- }
363
+ switch (enc) {
364
+ case CE_BYTES:
365
+ return " bytes" ;
366
+ case CE_LATIN1:
367
+ return " latin1" ;
368
+ case CE_UTF8:
369
+ return " UTF-8" ;
370
+ default :
371
+ return " unknown" ;
372
+ }
373
+ }
374
374
375
- inline void set_encoding ( cetype_t encoding ) {
376
- enc = encoding;
377
- if (data != NULL )
378
- data = Rf_mkCharCE (Rf_translateCharUTF8 (data), enc);
379
- }
375
+ inline void set_encoding ( cetype_t encoding ) {
376
+ enc = encoding;
377
+ if (data != NULL )
378
+ data = Rf_mkCharCE (Rf_translateCharUTF8 (data), enc);
379
+ }
380
380
381
381
inline void set_encoding (const char * encoding) {
382
- if ( encoding == " bytes" ) {
383
- enc = CE_BYTES;
384
- } else if ( encoding == " latin1" ) {
385
- enc = CE_LATIN1;
386
- } else if ( encoding == " UTF-8" ) {
387
- enc = CE_UTF8;
388
- } else {
389
- enc = CE_ANY;
390
- Rcout << " Unknown encoding" << std::endl;
391
- }
382
+ if ( encoding == " bytes" ) {
383
+ enc = CE_BYTES;
384
+ } else if ( encoding == " latin1" ) {
385
+ enc = CE_LATIN1;
386
+ } else if ( encoding == " UTF-8" ) {
387
+ enc = CE_UTF8;
388
+ } else {
389
+ enc = CE_ANY;
390
+ Rcout << " Unknown encoding" << std::endl;
391
+ }
392
392
set_encoding (enc);
393
- }
393
+ }
394
394
395
395
bool operator <( const Rcpp::String& other ) const {
396
396
return strcmp ( get_cstring (), other.get_cstring () ) < 0 ;
You can’t perform that action at this time.
0 commit comments