cpp_client_telemetry icon indicating copy to clipboard operation
cpp_client_telemetry copied to clipboard

Reconcile string conversion usage everywhere

Open kindbe opened this issue 5 years ago • 1 comments

I have one suggestion, not directly related to this commit: there are some spots in code (one in UtcHelpers) that rely on either bad or improper or invalid UTC-16 to UTF-8 conversion. Since we are refactoring this into separate different module, I wonder once this migration is done - should we also adjust the UtcHelpers to use the function from your new file?

I'm specifically worried about this line here: https://github.com/microsoft/cpp_client_telemetry_modules/blob/328df0b08dd17888e039373e2abb5d2128df136c/utc/universal/UtcHelpers.cpp#L56

There could be a few other spots that deal with wstring to string conversion...

Another question is for the code beyond C++11 (since wstring_Convert is deprecated), should we consider having #ifdef here and for Windows Desktop use Win32 API to convert? https://stackoverflow.com/questions/57134511/converting-utf-16-to-utf-8-using-widechartomultibyte-in-c-on-windows

@msftmel @jsmrcina - re. UTC conversion issue for app local temp dir path.

Originally posted by @maxgolov in https://github.com/microsoft/cpp_client_telemetry/pull/259#issuecomment-579932872

kindbe avatar Jan 30 '20 17:01 kindbe

Related to #191

bliptec avatar Feb 04 '20 21:02 bliptec