Sep-07-2019, 02:46 AM
Okay, I found the source of the problem and the solution and, honestly, it was a bit dumb. I just didn't look very well into that.
When I was opening the new file for writing, I had done:
For some reason, I wrongly assumed—unconsciously, actually—that after reading the contents with that encoding, they will be written in the same way to a new file.
Either way, you have taught me a lot here.
About your examples, they go beyond my understanding and knowledge at the time.
- C:\code would be a path to my code file?
- What does that λ mean?
- What is the difference between your first and second example? Just the same with different encoding depending on how you save the file?
I think I have too many questions about the test code.
Thank you very much, again.
When I was opening the new file for writing, I had done:
newFile = open(fileName, 'w+')which used I don't know what encoding scheme. After opening as 'utf-8' for writing, the file works well with the subsequent converter.
For some reason, I wrongly assumed—unconsciously, actually—that after reading the contents with that encoding, they will be written in the same way to a new file.
Either way, you have taught me a lot here.
About your examples, they go beyond my understanding and knowledge at the time.
- C:\code would be a path to my code file?
- What does that λ mean?
- What is the difference between your first and second example? Just the same with different encoding depending on how you save the file?
I think I have too many questions about the test code.
Thank you very much, again.