Cannot open .csv files
-
Auto updated from (32bit) v7.7.1 to 8.2.1
When opening a file with the extension .csv Npp just closes
upgraded to 8.3.2 same behavior
changed file extension to .txt - no issue
no crash info
is there a start log?Notepad++ v8.3.2 (32-bit)
Build time : Feb 26 2022 - 23:11:29
Path : C:\Local\Notepad++\notepad++.exe
Command Line : “C:\temp\AF-SMS-ADB-CL\Anna\CSV\AF_SMS_2010-04-10-8.txt”
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 2009
OS Build : 19044.1566
Current ANSI codepage : 65001
Plugins : BigFiles.dll ComparePlugin.dll CSScriptNpp.dll CSVLint.dll DSpellCheck.dll ERPHelper.dll linesort.dll mimeTools.dll NppBplistPlugin.dll NppCalc.dll NppConverter.dll nppcrypt.dll NppExport.dll NppFavorites.dll NppHasher.dll NPPJSONViewer.dll NppSaveAsAdmin.dll NppTextFX.dll NppTextViz.dll NppToolBucket.dll NppXmlTreeviewPlugin.dll OpenSelection.dll PoorMansTSqlFormatterNppPlugin.dll PreviewHTML.dll Python Indent.dll PythonScript.dll qkNppReverseLines.dll RegexTrainer.dll Remove_dup_lines.dll SelectQuotedText.dll SpellChecker.dll Translate.dll urlPlugin.dll XMLTools.dll -
You have a lot of plugins! Try running with
-noPlugin
on the command line so none load and I’ll venture a guess it will be fine. 8.2.1 is just before a breaking changes on plugin backward compatibility so not sure exactly what your issue it, but my though since you specifically mention CSV files is you may need to updated CSVLint plugin. The author @Bas-de-Reuver is active on this site and making updates to that (excellent) plugin as it’s relatively new.FYI: other plugins you have that will cause issues with Notepad++ > 8.2.1:
- ComparePlugin
- CSScriptNPP
- DSpellCheck
- PythonScript
- XMLTools
That’s not to say all the others will work - they too may have issues as some I don’t even know about and others are old and abandoned (e.g., PreviewHTML) so probably won’t be updated even if there is an issue.
Cheers.
-
Not to say it is a problem, but I think if I were posting to ask a question like @Hard_Thinking-About 's, I’d look at my long list of plugins and wonder if the problem isn’t somewhere there. :-)
-
@hard_thinking-about said in Cannot open .csv files:
When opening a file with the extension .csv Npp just closes
…
Current ANSI codepage : 65001
…
Plugins : BigFiles.dll ComparePlugin.dll CSScriptNpp.dll CSVLint.dll DSpellCheck.dll …Thanks for posting this including the debug info 👍 Someone also e-mailed me about this, and I’m almost certain it’s my CSV Lint plug-in. There seems to be a bug with diacritic characters â ë ó etc. (non-ascii chars) when Windows is set to code page 65001.
You can set the code page in Windows settings
Control Panel -> Clock and Region -> Region
then on the Administrative tab the buttonChange system locale
in that dialog there is a checkboxUse Unicode UTF-8 for worldwide language support
. When you enable the checkbox the code page is set to 65001, en when it’s unchecked then it’s 1252, at least on my system, 1252 = English + most European languages.You can also see the Windows codepage setting in Notepad++ menu
? -> Debug info
, see also screenshot below.I’ll have to fix the bug and I want to do an update of the plug-in as soon as possible. But for now you can either remove the plugin, or set Windows to a different code page.
-
@michael-vincent said in Cannot open .csv files:
since you specifically mention CSV files is you may need to updated CSVLint plugin. The author @Bas-de-Reuver is active on this site and making updates to that (excellent) plugin as it’s relatively new.
Thanks for tagging me to let me know about this thread. I’ve managed to locate the bug to this line where it does an illegal read at the end of
content
.I suspect it’s better to convert the variabele to a StreamReader so then you can more reliably do a
Read()
andPeek()
instead just copyingchar
using index. I don’t have the time right now, but I’ll look into this in more detail later this week. -
It seemed to be files > 10k
I agree too many plugin installed (going to use vs need - assessed)
I uninstalled many including- CSScriptNPP
DSpellCheck
PythonScript
XMLTools
Leaving only these installed:
BigFiles - Open Very Large Files 0.1.3
Compare 2.0.1
JSON Viewer 1.40
Mime tools 2.7
Notepad++ bplist plugin 1.3
Npp Xml Treeview 2
Save as admin 1.0.211Updated compare to 2.0.2
Added back in Python, XMLTools, CS-Script, CVSQuery, DSpellCheck, CSV Lint
Had to Remove CSV Lint
Cause of crashing CSV LintCodepage - by default WIN 10 claims to use UTF-8 by default. My regional settings are English (US) and the Box - Beta: Use Unicode UTF-8 is checked.
in NPP UTF-8 and apply to opened ANSI files are checked. UTF-8 with BOM is not
Side note:
If someone were to stumble onto the issue while searching for UTF-8.
However I remember and issue with opening these csv files with EXCEL and UTF-8 with BOM,
Double clicking on a CSV to open in EXCEL would open and import the file as ANSI.
To change this open the Registry Editor, navigate to-
HKEY_CURRENT_USER>Software>Microsoft>Office>15.0>Excel>Options (In my case EXCEL 2013)
-
Look for the key DefaultCPG if it exists skip to the last line. Otherwise add it:
-
Right click in the right-hand window and choose New>DWORD
-
Name the new DWORD item DefaultCPG and hit enter.
-
Then right click on DefaultCPG and choose Modify.
-
Set the Base to Decimal, and enter the decimal value for Unicode UTF-8 (65001 in this case), then hit OK.
- CSScriptNPP