I am uploading values with the following code
$pnp.sp.web.getFolderById(targetFolderUniqueId).files.add(fileName, file, _shouldOverwrite)
When I upload a filename like
'add from existing site columns'.png
it obviously fails. I have been able to work around this in the past with escaping the single quotes with %27, which gives me
%27add from existing site columns%27.png
and encodeURI to get
%27add%20from%20existing%20site%20columns%27.png
Uploads the file great, and it converts the characters back in sharepoint 2016 so the file displays
'add from existing site columns'
on the screen. However, if I upload in 2019 it displays the file without replacing the single quotes.
what the file looks like on sharepoint page
I was wondering if Sharepoint 2019 handles special characters in a different way? Is there anyway to get filenames to decode ALL special characters when adding to a sharepoint folder in 2019?
Related
Win 10, Excel 2013 (32-bit) - Hyperlink and/or Hyperlink Function
Established file server (not under my control) has some folders with the pound character in the path, e.g., \server\folder1\#___someCompany\someTopic.
I'm trying to create hyperlink to the someTopic folder. Hard coding UNC path via set Hyperlink did not work correctly. Windows opens Explorer at folder1 level. Similarly, Excel's Hyperlink Function produces the same result.
Interestingly, manually navigating thru the folder structure using Explorer yields no issues. Also, copying and pasting the entire UNC path into Explorer also works as expected.
I've tried to escape the # character with slash or backtick to no avail.
I've tried to encapsulate the entire UNC path in " using the cell Hyperlink or the Excel Hyperlink function both to no avail.
Evidence suggests that it is an Excel implementation limitation.
Workaround?
TY, that is indeed part of the solution. However, there is also some noteworthy granularity here.
Cell-based Hyperlink:
After tinkering, I found that reversing the folder separator characters, swapping "\" with "/", worked as-is without having to employ the percent-based escape sequence "%23" for "#".
The same cannot be said for the Hyperlink Function however. It's behavior is different.
Swapping folder delimiter characters only results in the previously unwanted result.
Swapping folder delimiter characters AND employing the percent-based escape sequence does produce the desired Explorer result.
For completeness, attempts to utilize hyperlinks that employed only the percent-based escape sequence resulted in Excel declaring an error.
TY and I hope this helps anyone else who encounters this or related issues.
I searched all around internet how to save CVS file as Unicode (UTF-8), but it still does not work, whenever i save, and open the file, there is ????? instead of letter that are UTF-8.
Has anyone ever had this issue? how can i solve this?
This has been annoying short coming of Excel for a long time.
A way to work around this issue, is to do the following:
Save as... Unicode text (*.txt). Make sure to keep the extension as txt (or at least not csv). It will be saved with tabs instead of commas separating the columns.
Open the document. You will be prompted with an import wizard, like so:
For File origin, choose 65001: Unicode (UTF-8)
For the rest of the options, choose the common sense options.
You will have your document back, ready to edit, with the proper unicode text intact.
I have an Excel file with several sheets connected to many external csv files. This has worked fine for now working on my own, but now I'd like to be able to move the Excel file and/or csv files, or hand them off to someone else, and not break the connections.
The method here works for updating the file name based on a provided string:
Editing "text connection" paths
...but it doesn't preserve the text to columns settings after updating the path. Since I'm dealing with csvs, I need the import to come in as comma delimited. Since I'm dealing with a lot of connections in a single file, I'd also like to be able to let the user define a single path somewhere, and have it automatically use that path to find the files.
When I try to upload some files with names in UTF-8 to server. It seems that several characters is cut off. For example, Đề thi đẫm máu is stored as thi đẫm máu (Đề is lost). I also try creating new UTF-8 filenames on system. And some errors occur that those files can't be deleted or opened. (i.e. indexá.php)
I found that this file is stored correctly in root. So it could be an error of display on admin control panel.
How could I fixed this?
When I create a document with MS Word and upload it to an html server it it correctly displayed when it is a windows server, but not when it is a linux server.
I tried this with both IE and Firefox.
The meta tag in the source says charset=windows-1252
Displaying the source code in the browser shows exactly the same source as I uploaded, so the server is not changing that. Nevertheless are characters like accented e displayed as silly characters when obtained from the linux server.
So somewhere in the tcp/http/??? records that the server sends to the browser makes the browser interpret the characters different from what is ment.
What could that be?
When you create a document in MS Word, there are a lot of characters that you can't see that are actually in the file, such as end of line markers, page breaks, etc. which you will not notice until after you upload the file to the server.
You should always use a plain text editor such as Notepad++, or even bluefish to create these files. Sometimes you can get MSWord to do the trick if you make sure to save the file as a web document(htm or html), but the special characters will usually begin to cause problems depending on your goal.