Author |
Topic |
|
flycs99
China
8 Posts |
|
cpyang
USA
1406 Posts |
Posted - 06/14/2020 : 4:56:49 PM
|
That documentation page might be wrong, or out dated, since Origin has been changed to use Unicode, UTF8. We updated Labtalk to properly handle Unicode, but OriginC was not updated for that.
Best will be to code in Python in Origin. We are making a lot of improvement in this area, you can request a beta of 2021 try out Python.
CP
|
|
|
EleanorGagne
USA
2 Posts |
Posted - 06/30/2020 : 12:35:06 AM
|
quote: Originally posted by flycs99
For example: sting str="ああ"; printf("%d\n",str.Count('あ')); https://texttospeech.onl
The return value is 0.
According to https://www.originlab.com/doc/OriginC/ref/string-Count,wide characters are supported. Please help me to count the wide characters.
size_t strlen( const char *str ); size_t wcslen( const wchar_t *str ); size_t _mbslen( const unsigned char *str ); size_t _mbslen_l( const unsigned char *str, _locale_t locale ); size_t _mbstrlen( const char *str ); size_t _mbstrlen_l( const char *str, _locale_t locale ); |
Edited by - EleanorGagne on 06/07/2021 02:58:37 AM |
|
|
flycs99
China
8 Posts |
Posted - 07/01/2020 : 01:24:18 AM
|
quote: Originally posted by cpyang
That documentation page might be wrong, or out dated, since Origin has been changed to use Unicode, UTF8. We updated Labtalk to properly handle Unicode, but OriginC was not updated for that.
Best will be to code in Python in Origin. We are making a lot of improvement in this area, you can request a beta of 2021 try out Python.
CP
Thank you for your reply. It is helpful. I will try python. |
|
|
flycs99
China
8 Posts |
Posted - 07/01/2020 : 01:42:37 AM
|
quote: Originally posted by EleanorGagne
quote: Originally posted by flycs99
For example: sting str="ああ"; printf("%d\n",str.Count('あ')); https://texttospeech.onl https://mortgagecalculator.tech
The return value is 0.
According to https://www.originlab.com/doc/OriginC/ref/string-Count,wide characters are supported. Please help me to count the wide characters.
size_t strlen( const char *str ); size_t wcslen( const wchar_t *str ); size_t _mbslen( const unsigned char *str ); size_t _mbslen_l( const unsigned char *str, _locale_t locale ); size_t _mbstrlen( const char *str ); size_t _mbstrlen_l( const char *str, _locale_t locale );
Thank you for your reply. This solution is very helpful and I can really get everything in the wide character strings. I will find the originC files for these functions. |
|
|
|
Topic |
|
|
|