Yeah, I just saw that. Well the filename coming from the web framework definitely has an encoding of Nil, so that’s the first problem. It should probably be coming to you as UTF8. If you simply do:
[quote=268571:@Brian O’Brien]The thing I can’t understand is that the line
FileName = FileNames(0)[/quote]
Thats just assigning the first String in an array of Strings to a String Property of the same Method, that can’t be the problem, you’re getting an erroneous trigger there.
ok, try this.
Grab a hex editor for the mac, no idea what one is decent, dont use osx that much.
Check the line terminator in your file that you are uploading. If its 0D then stick with UNIX that isnt the problem. If its 0D0A then read on:
You have the following code in your example
rows = csvData.Split(EndOfLine.UNIX)// Chr(&h0d))
Yet above you’re saying
That will mean you have 0A left over at the end of your strings after the split
@Brian, I’m not sure if the splitting of strings is your current issue but I’m sure 64-bit has that splitting strings problem.
Assuming ‘Content’ comes in as String, this pretty much how I unpack files.
Dim Result As Text = Content.ToText
// Process if we have results
If Result.Length <> 0 Then
Dim Lines() As Text
Lines = Result.Split(Text.FromUnicodeCodepoint(10))
// Parse Response
Dim Delimiter As Text = "|"
Dim Arr(-1) As Text
For i As Integer = 0 To Lines.Ubound
Redim Arr(-1)
Dim Line As Text = Lines(i)
Arr = Line.Split(Delimiter)
//.. do something with Arr
I try to handle the encoding afterwards
Can you supply a text file with bogus information that has the same issue?
[quote=268584:@Marco Hof]@Brian, I’m not sure if the splitting of strings is your current issue but I’m sure 64-bit has that splitting strings problem.
[snip]
I try to handle the encoding afterwards
Can you supply a text file with bogus information that has the same issue?[/quote]
The issue is fixed. And I did find the 64 bit documentation that recommended substituting Split for SplitB.