I'm trying to read a unicode file and place it's rows into char arrays. Somewhere I kind of get astray in my attempts. I found some functions that seemed promising, see code below.
Finding "functions that seem promising" is hardly a good way to learn the language.
Also, "unicode file" is insufficient description. Is this a UTF-8 file, UTF-16 file, UTF-16le file, UTF-32 file, or maybe GB18030 file? Assuming UTF-8 (the most common case on your OS), there is nothing special to be done. Your program should be written this way:
Thanks for your concerned answer. :-) At this stage I just have to rely on my java knowledge. However, if this project turns out nicely I just might...
About the code and your suggestions. How do you reckon I should store the attribute to each char if I go with strings..?
Is there a better way of storing/handling info like this:
Edit, I think I misunderstood your post, the part about vectors. At first glance it looks like an arraylist - java. They're not slower than arrays, or? I have to merge chunks of chars... Merging vectors aren't heavier than reallocate a new array to merge two arrays in one new?
Number of operations..?
Array1 + Array2 --> in new Array
Vector1 + Vector2 --> in Vector1