Question: I haven't long time in touch with C language. I have some questions related to chinese words and strncpy. 

```
char* testString = "你好嗎?"
sizeof(testString) => it prints out 4.
strlen(testString) => it prints out 10.

```

When i want to copy to another char array, i have some issue.

char msgArray[7]; /\* This is just an example. Due to some limitation, we have limited the buffer size. \*/

If i want to copy the data, i need to check 

```
if (sizeof(testString) < sizeof(msgArray)) {
    strncopy(msgArray, testString, sizeof(msgArray));
}

```

It will have problem. The result is it will only copy a partial data. 

Actually it should have compared with 

```
if (strlen(testString) < sizeof(msgArray)) {

}
else {
   printf("too long");
}

```

But i don't understand why it happened. 

If i want to define to limit the characters count (including unicode (eg. chinese characters), how can i achieve to define the array? I think i can't use the char[] array. 

Thanks a lot for all the responses.

My workaround solution: I finally decide to cut the strings to meet the limited bytes.

Answer: 
Pointers are not arrays. `testString` is a pointer and therefore, `sizeof(testString)` will give the size of pointer instead of the string it points to. 

`strlen` works differently and only for null terminated `char` arrays and string literals. It gives the length of the string preceding the null character.
I am not pro, but you may try somthing like this:

```
char* testString = "你好嗎?\0"; //null-terminating char at the end
int arr_len = 0;
while(testString[arr_len])
arr_len++;

```

As result, it returns 10, whih is number of array field, so if you multiply it by the size of single byte, you will get actual length of the string.

Regards, 
Paweł