Bug 1823084 Comment 11 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Can you please remove the use of `ToNewUnicode()`. This is not correct.

If you want to assign an UTF-8 string (nsCString) to an UTF-16 (nsString), please use, for example:
```C++
nsString actionValue;
nsAutoCString filterActionSpam;
...
actionValue = NS_ConvertUTF8toUTF16(colufilterActionSpammn);
// or
actionValue.Assign(NS_ConvertUTF8toUTF16(colufilterActionSpammn));
```
`ToNewUnicode()` is used where the raw string pointer is needed, for example:
https://searchfox.org/comm-central/rev/59e54529a5756a6bd53654461c5ebf2bd8cd1c77/mailnews/extensions/mailviews/nsMsgMailViewList.cpp#32-37
Can you please remove the use of `ToNewUnicode()`. This is not correct.

If you want to assign an UTF-8 string (nsCString) to an UTF-16 (nsString), please use, for example:
```C++
nsString actionValue;
nsAutoCString filterActionSpam;
...
actionValue = NS_ConvertUTF8toUTF16(filterActionSpam);
// or
actionValue.Assign(NS_ConvertUTF8toUTF16(filterActionSpam));
```
`ToNewUnicode()` is used where the raw string pointer is needed, for example:
https://searchfox.org/comm-central/rev/59e54529a5756a6bd53654461c5ebf2bd8cd1c77/mailnews/extensions/mailviews/nsMsgMailViewList.cpp#32-37

Back to Bug 1823084 Comment 11