In official letters, registration documents and common usage, one can often see unbalanced quotation marks, e.g.
ОАО «Корпорация «Комета» — two opening quotes followed by only one closing quote.
I would like to automate the correct placement of quotation marks. For instance, given the sentence:
Газета "Правда" сообщила, что Иванов, возглавлявший ОАО "Корпорация "Ромашка", уходит в отставку.
that has five quotation marks:
The quotation marks 1,3, and 4 are opening and the marks 2, and 5, are closing.
In general terms, I'd like to know if unbalanced quotation marks are correct usage. Is this specific to the Russian language?
As for the implementation details, it seems that the choice of opening and closing quotation marks in the Russian language follows a simple rule:
If a quotation mark follows a space or a punctuation mark, then it must be a closing quote, otherwise it's an opening quote.
Is this rule correct?