Closed huatiao closed 9 months ago
When loading file as GBK (or other encoding other than UTF-8 or ANSI), Notepad2 converts document content from GBK to UTF-16, then UTF-16 to UTF-8, due to the limitation of MultiByteToWideChar()
and WideCharToMultiByte()
, it's may fails when file size is near 2GB.
https://github.com/zufuliu/notepad2/blob/90dfbf8f6370b2410a692cdab092ff190e234e48/src/Edit.h#L423-L424
You can use menu File -> Reload -> As ANSI
to reload the file with ANSI (GBK in your case) encoding.
Unckeck "Open ANSI (unknown encoding) files in UTF-8 mode." (from menu File -> Encoding -> Default...
) should speedup loading ANSI files.
1.8G日志文件,UTF-8模式可以打开,GBK模式打不开