0

Background:

I'm working on a solution which will include writing data from multiple countries and reading from to the windows event log (e.g. if there's an exception processing a customer record I may include the customer's name in the description text to make it more human readable; customers' names are likely to require special characters from their language - and we will never take Prince as a customer).
I'm writing and reading as various systems in our business are writing whilst I'm defining the monitoring system which will be reading from & working with event log data.

I've looked on Google but can't find any relevant information on this. Looking at the XML view of Events there's no file header / encoding attribute defined. I'd assume it's UTF-8 in the later versions, but can't find this documented / would be surprised if older versions supported that encoding.

Questions:

  • What character set is used by the Windows Event Log?
  • Is it the same for all versions of Windows?
4

1 回答 1

0

佩尔Hans Passant的评论:

所有 Windows winapi 函数和内部数据结构都使用 utf-16 编码字符串,事件日志也是如此。您只能使用旧的 ReportEventA() 函数遇到麻烦。

于 2016-09-21T21:32:08.420 回答