Atlassian Support Inquiry
1. 環境情報 / Environment
項目 / Item | 内容 / Detail |
|---|
製品 / Product | Confluence Data Center |
OS | Windows Server |
DB | PostgreSQL 16 |
DBロケール / DB Locale | Japanese_Japan.932 (LC_COLLATE)
|
WikiWorksバージョン / Version | V3.6 |
2. 発生した現象 / Issue Description
JA: ページのバージョンアップ・言語コピー後に、タイトルにダイアクリティカルマーク付き大文字(例:Ä、Ö、Ü、É)を含むページへの ac:link が壊れ、createpage.action リンクに変化しました。ダイアクリティカルマークを含まないタイトルへのリンクは正常に動作していました。
EN: After page version-up or language copy, ac:link references to pages whose titles contain uppercase diacritical characters (e.g., Ä, Ö, Ü, É) broke and became createpage.action links. Links to pages without diacritical characters continued to work correctly.
# Before / 修正前 (working)
https://.../pages/123456/Ändern+des+Gruppennamens
# After / 修正後 (broken)
https://.../pages/createpage.action?spaceKey=...&title=%C3%84ndern...&linkCreation=true
3. 原因調査結果 / Root Cause Analysis
JA: Confluenceがページを検索する際、以下のクエリを使用していることを確認しました。
EN: We confirmed that Confluence uses the following query when rendering a link:
SELECT * FROM content
WHERE lowertitle = lower('Ändern des Gruppennamens')
AND spaceid = '...';
JA: 問題は、PostgreSQLの lower() 関数がWindowsロケール Japanese_Japan.932 環境ではダイアクリティカルマーク付き大文字を正しく小文字化できないことにありました。その結果、DBに保存された content.lowertitle とConfluenceが検索時に使用する値が一致せず、ページが見つからない状態になっていました。
EN: The problem was that PostgreSQL's lower() function cannot correctly lowercase uppercase diacritical characters under Windows locale Japanese_Japan.932. As a result, content.lowertitle stored in the DB did not match the value Confluence computed at lookup time, causing the page not to be found.
PostgreSQL lower('Ä') = 'Ä' ← not lowercased (incorrect)
Java toLowerCase('Ä') = 'ä' ← correctly lowercased
4. 実施した対処 / Workaround Applied
JA: 以下のSQLでICU collationを使用して lowertitle および lowerdestpagetitle を再生成し、既存のリンク切れを修正しました。この対処後、既存のリンク切れは解消されました。
EN: We applied the following SQL using ICU collation to regenerate lowertitle and lowerdestpagetitle, which resolved the existing broken links.
CREATE COLLATION unicode_ci_test (
provider = icu,
locale = 'en-US',
deterministic = false
);
UPDATE content
SET lowertitle = lower(title COLLATE unicode_ci_test)
WHERE contenttype = 'PAGE';
UPDATE links
SET lowerdestpagetitle = lower(destpagetitle COLLATE unicode_ci_test);
5. 確認したいこと / Questions for Atlassian
質問1 / Question 1
JA: pageManager.saveContentEntity() でページを保存する際、content.lowertitle はJava側(String.toLowerCase())で計算されてDBに保存されますか?それともDBの lower() 関数を使用して計算されますか?
EN: When saving a page via pageManager.saveContentEntity(), is content.lowertitle computed by Java (String.toLowerCase()) before storing to DB, or does Confluence rely on PostgreSQL's lower() function?
質問2 / Question 2
JA: 翻訳インポート(プラグインから saveContentEntity() を呼び出してページを作成)を実行した後、新規作成されたページの lowertitle は正しく再計算されますか?特に、Windows の Japanese_Japan.932 ロケール環境において、ダイアクリティカルマーク付き大文字のタイトルを持つページが正しく lowertitle を持つかどうか確認したいです。
EN: After translation import (creating pages via saveContentEntity() from a plugin), will lowertitle for newly created pages be correctly computed for titles containing uppercase diacritical characters (e.g., Ä, Ö, Ü)? We are particularly concerned about environments running Windows with Japanese_Japan.932 locale.
質問3 / Question 3
JA: このような環境(Windows + Japanese locale + PostgreSQL)において、lowertitle が不正なデータになるケースは既知の問題ですか?推奨の恒久的な対処策はありますか?現在のSQLによるworkaroundでは、翻訳インポートのたびに再実行が必要になる可能性があるため、根本的な解決策を求めています。
EN: Is incorrect lowertitle data in Windows + Japanese locale + PostgreSQL environments a known issue? Is there a recommended permanent fix? Our current SQL workaround may need to be reapplied after every translation import, so we are looking for a root-cause solution.
6. 再現手順 / Steps to Reproduce
- JA: Windows Server上にConfluence DCをインストール(PostgreSQL DBのロケールが
Japanese_Japan.932)
EN: Install Confluence DC on Windows Server with PostgreSQL DB locale set to Japanese_Japan.932 - JA: タイトルに
Ändern des Gruppennamens(大文字 Ä を含む)というページを作成し、そのページへのリンクを別ページに設置する
EN: Create a page titled Ändern des Gruppennamens (containing uppercase Ä) and add an ac:link to it from another page - JA: 別スペースへのバージョンアップ(言語コピー)を実行する
EN: Perform a version-up (language copy) to a new space - JA: コピー後のスペースで、上記ページへのリンクを確認する
EN: Check the link to the target page in the copied space - JA: →
createpage.action リンクになりリンク切れが発生する
EN: → Link becomes a createpage.action URL — broken link confirmed
Ticket reference: JPNS-108479