I am using the Google App Engine and I need to put a multi-line string in the data store. Unfortunately, GAE does not allow this. I need this line to be multi-line, so is there a way to convert a multi-line line to one line and store it?
You do not need a conversion:
google.appengine.ext.db.StringProperty (multi-line = true)
Replace all newline characters with "\ n" and replace all "\" with "\\", as with string literals:
def encode(s): return s.replace("\\", "\\\\").replace("\n", "\\n") def decode(s): return s.replace("\\\\", "\\").replace("\\n", "\n")
Source: https://habr.com/ru/post/1757053/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1757048/this-doesnt-work-when-binding-functions-to-events-inside-a-javascript-class&usg=ALkJrhhfpGQ-rPMOcNfA6WYlzqOPLwOqgQPHP REGEX: problem with Smiley `:)` and `:))` - phpUsing the evacuation codec function - phpteamplayer and pyhook interact weirdly - pythonExpect (language) "could not compile the regular expression pattern: quantifier quantifier error is invalid" - expectExisting library / access control structure with limited access? - securityDelphi 2010 - IBX - UTF8 - problem with dbmemo - delphiTinyMCE tooltip text - javascriptA way to get the day of the week, peacetime - javaCould not find text element with id in svg - javascriptAll Articles