Internationalization and localization tools


Locale-Sensitive Length Functions

void *memcpy(void *restrict to, const void *restrict from, size_t size);

wchar_t *wmemcpy(wchar_t *restrict wto, const wchar_t *restruct wfrom, size_t size);

Internationalization (I18n) Function Overview

The memcpy function copies size bytes from the object beginning at from into the object beginning at to. The behavior of this function is undefined if the two arrays to and from overlap; use memmove instead if overlapping is possible.

wmemcpy is the wide version of the function; its parameters and return value are wide character strings and size is the number of wide characters, not bytes, to be copied.

I18n Issues

Care must be taken with the size parameter. For example, when transitioning from a singlebyte to a multibyte environment, make sure you are passing the number of bytes rather than the number of characters for the size parameter of memcpy.

Conversely, when transitioning from a singlebyte to a Windows Unicode environment, make sure you are passing the number of characters rather than the number of bytes for the size parameter of wmemcpy.

There is no Windows Generic function for memcpy.

Recommended Replacements*

*If you're already using the recommended function, see I18n Issues for other reasons why Globalyzer is detecting the function.

Locale-Sensitive Length Functions

 

Lingoport internationalization and localization services and software