This function handles DBCS strings.

The following is the list of valid code pages: