Accidentally created a collection with "�" in its name. Now i'm looking for a way to delete it.
P.s. I tried db['�'].drop() and that did not work out for me.
Figured it out myself. db['\ufffd'].drop() worked for me. Converting "�" to unicode solved the problem. Hope someone finds it useful. This should work for other special characters as well.
Related
My word document has strange characters. Nothing is readable. I tried converting it to english and it was exactly the same. I have no clue how this happend and dont know what to do. it is a important document to me. please help. thank you
I tried converting it to english.
I've been working on a small project and came across some information that has some sort of encoding (I assume).
7C-FC-1B-C9-97-1B-A9-EB-2E-45-2A-73-CE-E3-17-F9
01-3E-6A-50-09-ED-1C-A1-80-A0-27-B9-0C-D3-C4-9D
89-4C-B3-52-4A-B8-93-CB-95-4F-E2-9A-0C-59-7C-FD
Does anyone know what sort of encoding this is? I looked into UTF-8 since this came from a SQL file. No luck there.
I think that is written in hexadecimal. Not encoded
registerModule() expects a submodule key as a third parameter.
I think it should probably not contain a space and only alphabetic characters (or alphanumeric?) and underscore ('_'), but I'm not really sure.
I could not find specific information for this.
The function makes use of \TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase to generate the full module name combined of main module and sub module connected with an _
So you already guessed the right answer.
It's a bit complicated strange to answer!
Official API document does not provide exact information. I have worked around some extension which has multiple sub-module. I'm quite sure this not allow special character as you sub-module key.
eg. web_TestTestbe123 (mainModulename_subModuleKey)
I have noticed bellow characteristic for the key:
Key must be lowercase
No space allowed
Numerica value would be fine
Does this make sense?
I found this in the documentation just now:
Backend modules
1. The modkey is made up of alphanumeric characters only. It does not contain underscores and starts with a letter.
https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ExtensionArchitecture/NamingConventions/Index.html
I've read all the posts about dashes and tried pretty much everything mentioned in them, yet cannot figure out a strange problem I'm having.
For example, I have an author name like this:
Arturo Pérez-Reverte
A search for 'pérez-reverte' will not turn up anything, nor will 'pérez-reverte' so escaping the dash is not the issue.
But a search for 'spider-man' will return hits, proving that the dash seems to be working.
However, a search for 'perez reverte' also finds a hit because it searches each word separately and finds the 'reverte' in 'perez-reverte' (but doesn't seem to find the 'perez').
A search for either 'pérez' or 'perez' finds the same number of documents, suggesting that the accent is not an issue (I do have a charset_table which accounts for accented characters).
So I'm very confused as to what's happening here. It if it isn't the accent and it isn't the dash, what could it be?
I don't have any ignore_chars set, I'm using UTF-8 and have a charset_table to treat accented characters as regular characters.
The only difference between these two terms is that one of them is a title (spider-man) and the other an author, but they are both part of the same Sphinx index declaration, so I don't see that as an issue in any way.
Any help would be greatly appreciated.
After much fighting with it, I found out that even though my database is all UTF-8 with the proper collation I needed to add this in sphinx.conf for everything to work properly:
sql_query_pre = SET NAMES utf8
sql_query_pre = SET CHARACTER SET utf8
After doing that, and having the proper charset_table, everything seems to be working fine.
Hope this helps someone else.
I'm trying to replace a character NOT AT THE START OF THE STRING, with itself followed by another character, using regexKitLite.
thisPlate = [sBasePlate
stringByReplacingOccurrencesOfRegex:[NSString stringWithFormat:#"([^\\^]%#)", thisChar]
withString:[NSString stringWithFormat:#"\1%#", thisRep]
];
If sBasePlate is "temp", then thisPlate gets set to emp, but I'm expecting it to be teemp
So I'm trying to replace NOT THE START OF THE STRING, followed by thisChar, with that which has been matched followed by thisRep.
Have I got my backreferences wrong? Because that's what seems to be missing. It's adding in thisRep, but ignoring the initial match and not putting it back in with \1
Sorry if I've done something really stupid and obvious, this is my first app.
Right, I solved it. I hate answering my own questions but someone else might make the same mistake as me, so the big stupid obvious thing I missed...
back references should be $ signs.
withString:[NSString stringWithFormat:#"$1%#", prevRep]
That's how that string should be written.
Annoyingly the documentation here says that a back reference should be "\n":
http://regexkit.sourceforge.net/RegexKitLite/
But an example elsewhere shows $n. I should have guessed that. Oh well.