First of all, it really has to be stressed that since freepascal upgraded to 3.0, the interior of the FPC changed the entire code processing from ansistring to UTF8 encoding (RTL with default codepage UTF-8).
The actual application will find that if the wndows API is used such as
function var poutbuflen:ulong): DWORD; stdcall;
{$EXTERNALSYM getadaptersinfo};
adapter_info-per-Adapter information. All IP addresses is stored as//Strings//Pip_adapter_info=^ip_adapter_info; {$EXTERNALSYM Pip_adapter_info}_ip_adapter_info=RecordNext:pip_adapter_info; Comboindex:dword; AdapterName:Array[0.. Max_adapter_name_length +3] ofChar; Description:Array[0.. Max_adapter_description_length +3] ofChar; Addresslength:uint; Address:Array[0.. Max_adapter_address_length-1] ofBYTE; Index:dword; Type_: UINT; Dhcpenabled:uint; currentipaddress:pip_addr_string; ipaddresslist:ip_addr_string; gatewaylist:ip_addr_string; dhcpserver:ip_addr_string; Havewins:bool; primarywinsserver:ip_addr_string; secondarywinsserver:ip_addr_string; leaseobtained:time_t; leaseexpires:time_t; End; {$EXTERNALSYM _ip_adapter_info}Ip_adapter_info=_ip_adapter_info; {$EXTERNALSYM Ip_adapter_info}Tipadapterinfo=Ip_adapter_info; Pipadapterinfo= Pip_adapter_info;
Description save is a regular string array, if it is ansistring easy to handle, containing characters other than ASCII, using Utf8encode (), can also be very good support, 1.6 version after the default utf8=ansistring (cp_ UTF8), the result is that for the non-identified string, the use of Utf8encode is invalidated, then AnsiToUtf8 () How, the same has no effect.
View LazUTF8 unit, a few more functions including WinCPToUTF8 (), yes it, processing WINAPI interface string, the display is normal.
Lazarus Unicode supports Http://wiki.freepascal.org/LCL_Unicode_Support, older solutions, suitable for 1.44+2.64, previous versions, to 1.6 + Version 3.0 needs a good understanding of Http://wiki.freepascal.org/Better_Unicode_Support_in_Lazarus.
Lazarus 1.44 upgrade to 1.6 UTF8 processing has changed.