This refferences the post from https://forums.macrumors.com/threads/734883/
So I have successfully used reg ex's to accomplish my tasks, and I give a sincere thank you shout out to all those that helped me, but I have run into a new issue.
I'm not seeing many things on google about this, that would serve my purposes anyway however on to the punchline
I have a text file that I am parsing for information. I am adding a new format that I am going to support this time, however the sly foxes have written unicode characters into their txt files.
I have been breaking down the text files by the 4 carriage returns "\n". So every "\n\n\n\n" I break the string down into an array, from there I break it down every single return to get the line-by-line information, and generally parse from there. However this is not working because of a unicode character... specificially "\Ufeff" Which seems to be a character that dictates to use standard spacing something something text.
This code comes at the beginning of every line, so I am getting errors, and unable to break the string into multiple strings based upon "\n" because it assumes that "\n\Ufeff" is a single character, and will not break it off at the \n without taking the \Ufeff along with it. Furthermore, when I attempt to
it tosses an error saying that \U is an "incomplete universal character name \Ufeff"
Has anyone dealt with anything like this, and come across a fancy way to remove this specific unicode character? It is really turning into a thorn in my side right now.
Thanks in advance
So I have successfully used reg ex's to accomplish my tasks, and I give a sincere thank you shout out to all those that helped me, but I have run into a new issue.
I'm not seeing many things on google about this, that would serve my purposes anyway however on to the punchline
I have a text file that I am parsing for information. I am adding a new format that I am going to support this time, however the sly foxes have written unicode characters into their txt files.
I have been breaking down the text files by the 4 carriage returns "\n". So every "\n\n\n\n" I break the string down into an array, from there I break it down every single return to get the line-by-line information, and generally parse from there. However this is not working because of a unicode character... specificially "\Ufeff" Which seems to be a character that dictates to use standard spacing something something text.
This code comes at the beginning of every line, so I am getting errors, and unable to break the string into multiple strings based upon "\n" because it assumes that "\n\Ufeff" is a single character, and will not break it off at the \n without taking the \Ufeff along with it. Furthermore, when I attempt to
Code:
anArray = [aString componentsSeparatedByString:@"\n\n\n\n\Ufeff"]
Has anyone dealt with anything like this, and come across a fancy way to remove this specific unicode character? It is really turning into a thorn in my side right now.
Thanks in advance