You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With below code snippet under win10 64 bit,source code in UTF8 no BOM & UTF8-BOM resulted in different display.
NappGUI has been built with MS Visual Studio 2022,64bit ,Release build.
while(cp!='\0') will result an infinite loop;while(cp!=-1) works.Don't know why
source code in UTF8 with BOM,console code page 936
Great thing: escape (\n) after a Chinese character works properly
issue: the while loop been interrupted,don't know why
---under code page 65001,all none ascii characters displayed improperly.
活动代码页: 936
E:\nappgui\build\Release\bin>con01
你好C+NappGUI元旦快乐! //<--- escape works
Happy New Year!
Orignal string : Ramón tiene un camión
Γει? σου Κ?σμε!????
cp=R
Item index #0 item value 97
Item index #1 item value 109
found !!
Item index #2 item value -1
[20:09:40] [OK] Heap Memory Statistics
[20:09:40] ===========================
[20:09:40] Total a/dellocations: 40, 40
[20:09:40] Total bytes a/dellocated: 8939, 8939
[20:09:40] Max bytes allocated: 8811
[20:09:40] Effective reallocations: (0/2)
[20:09:40] Real allocations: 1 pages of 65536 bytes
[20:09:40] ============================
[20:09:40] Config: Release
source code int UTF8,cosole code page 65001
issue: escape (\n) after Chinese character doesn't work.
Greate:while loop works as expected.
Active code page: 65001
E:\nappgui\build\Release\bin>con01
你好C+NappGUI元旦快乐!\nHappy New Year!
Orignal string : Ramón tiene un camión
Γειά σου Κόσμε!👋🌎
cp=R
Item index #0 item value 97
Item index #1 item value 109
found !!
Item index #2 item value 243
Item index #3 item value 110
Item index #4 item value 32
Item index #5 item value 116
Item index #6 item value 105
Item index #7 item value 101
Item index #8 item value 110
Item index #9 item value 101
Item index #10 item value 32
Item index #11 item value 117
Item index #12 item value 110
Item index #13 item value 32
Item index #14 item value 99
Item index #15 item value 97
Item index #16 item value 109
found !!
Item index #17 item value 105
Item index #18 item value 243
Item index #19 item value 110
Item index #20 item value 10
Item index #21 item value 915
Item index #22 item value 949
Item index #23 item value 953
Item index #24 item value 940
Item index #25 item value 32
Item index #26 item value 963
Item index #27 item value 959
Item index #28 item value 965
Item index #29 item value 32
Item index #30 item value 922
Item index #31 item value 972
Item index #32 item value 963
Item index #33 item value 956
Item index #34 item value 949
Item index #35 item value 33
Item index #36 item value 128075
Item index #37 item value 127758
Item index #38 item value 0
Item index #39 item value 0
Item index #40 item value 0
Item index #41 item value 0
Item index #42 item value 0
Item index #43 item value -1
[20:24:05] [OK] Heap Memory Statistics
[20:24:05] ===========================
[20:24:05] Total a/dellocations: 40, 40
[20:24:05] Total bytes a/dellocated: 8939, 8939
[20:24:05] Max bytes allocated: 8811
[20:24:05] Effective reallocations: (0/2)
[20:24:05] Real allocations: 1 pages of 65536 bytes
[20:24:05] ============================
[20:24:05] Config: Release
main.c
/* NAppGUI Console Application */
#include "core/coreall.h"
void test(void);
int main(int argc, char *argv[])
{
unref(argc);
unref(argv);
core_start();
bstd_printf("你好C+NappGUI元旦快乐!\nHappy New Year!\n"); //<----escape doesn't work
test();
core_finish();
return 0;
}
void test(void)
{
int32_t i=0;
const char_t mystr[]="Ramón tiene un camión\nΓειά σου Κόσμε!👋🌎";
bstd_printf("Orignal string : %s\n",mystr);
const char_t *it=mystr;
uint32_t cp=unicode_to_u32(it,ekUTF8);
bstd_printf("cp=%c\n",cp);
while(cp!=-1)
{
if(unicode_to_u32(it,ekUTF8)=='m')
{
bstd_printf("found !!\n");
}
it=unicode_next(it,ekUTF8);
cp=unicode_to_u32(it,ekUTF8);
bstd_printf("Item index #%d\titem value %d\n",i++,cp);
}
}
The text was updated successfully, but these errors were encountered:
你好C+NappGUI元旦快乐!
Happy New Year!
Orignal string : Ramón tiene un camión
Γειά σου Κόσμε!👋🌎
cp=R
Item index #0 item value 97
Item index #1 item value 109
found !!
Item index #2 item value 243
Item index #3 item value 110
Item index #4 item value 32
Item index #5 item value 116
Item index #6 item value 105
Item index #7 item value 101
Item index #8 item value 110
Item index #9 item value 101
Item index #10 item value 32
Item index #11 item value 117
Item index #12 item value 110
Item index #13 item value 32
Item index #14 item value 99
Item index #15 item value 97
Item index #16 item value 109
found !!
Item index #17 item value 105
Item index #18 item value 243
Item index #19 item value 110
Item index #20 item value 10
Item index #21 item value 915
Item index #22 item value 949
Item index #23 item value 953
Item index #24 item value 940
Item index #25 item value 32
Item index #26 item value 963
Item index #27 item value 959
Item index #28 item value 965
Item index #29 item value 32
Item index #30 item value 922
Item index #31 item value 972
Item index #32 item value 963
Item index #33 item value 956
Item index #34 item value 949
Item index #35 item value 33
Item index #36 item value 128075
Item index #37 item value 127758
Item index #38 item value 0
[21:23:10] [OK] Heap Memory Statistics
[21:23:10] ===========================
[21:23:10] Total a/dellocations: 40, 40
[21:23:10] Total bytes a/dellocated: 8939, 8939
[21:23:10] Max bytes allocated: 8811
[21:23:10] Effective reallocations: (0/2)
[21:23:10] Real allocations: 1 pages of 65536 bytes
[21:23:10] ============================
[21:23:10] Config: Debug
With below code snippet under win10 64 bit,source code in UTF8 no BOM & UTF8-BOM resulted in different display.
NappGUI has been built with MS Visual Studio 2022,64bit ,Release build.
while(cp!='\0')
will result an infinite loop;while(cp!=-1)
works.Don't know whyGreat thing: escape (\n) after a Chinese character works properly
issue: the while loop been interrupted,don't know why
---under code page 65001,all none ascii characters displayed improperly.
issue: escape (\n) after Chinese character doesn't work.
Greate:while loop works as expected.
main.c
The text was updated successfully, but these errors were encountered: