My utf-8 encoded file has curly quotes ("").
How to replace them with regular quotation marks (?)?
cell_info.replace('"','"') cell_info.replace('"','"')
does not work. There is no error message.
Thank.:)
str.replace() does not replace the original string, it just returns a new one.
str.replace()
do:
cell_info = cell_info.replace('"','"').replace('"','"')
another way that works with my code is the following:
cell_info = cell_info.replace(u'\u201c', '"').replace(u'\u201d', '"')
because I have this "# -encoding: utf-8 -" at the top of my script
The replace method returns a new line with a complete replacement. It does not act directly on the string.
Source: https://habr.com/ru/post/1758484/More articles:folderbrowserdialog on winforms C # - c #Can Haskell Text.Json package read but not write Rationals? - jsonInclude a menu on every page - cssopen a new window and write to him in the development of the Firefox extension - javascriptТегявляется элементом уровня блока в XHTML? - htmlесть все равно, чтобы увеличить визуальную студию 2010, если у вас нет прокрутки на вашей мыши - visual-studio-2010How to allow iPhone 4 only to use the application because it uses the front camera - iphoneC # Type Link Properties? - c #How to change the font color of individual characters in a UIPickerView string? - objective-cHow to trigger an AJAX request for a date change event? - jsonAll Articles
является элементом уровня блока в XHTML? - html