flowable / flowable/flowable-engine
Business process page process model user task name cannot be displayed normally in Chinese
- Vorherrschende Sprache
- Java
- Sterne
- 9.5k
- Forks
- 2.9k
- Ø Merge
- 7 Std. 8 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
**Describe the bug**
User task name can not use Chinese,Otherwise, it will be displayed as a frame, like [] []
**Expected behavior**
request address:http://localhost:8087/rest/models/5ddad80b-c53e-11ec-a4df-0a5bd6c7e863/thumbnail?version=1650975940618
response type is "image/jpeg",but liek the [][]
source localtion(java):org.flowable.ui.modeler.rest.app.ModelResource,invoke method
@GetMapping(
value = {"/rest/models/{modelId}/thumbnail"},
produces = {"image/png"}
)
public byte[] getModelThumbnail(@PathVariable String modelId) {
Model model = this.modelService.getModel(modelId);
return model.getThumbnail();
}
This is just the return byte type, but I really don't understand why the Chinese in the picture will be garbled. I hope you can help me see this problem. Thank you very much!(I spent almost 2 hours trying to solve it, but it didn't work. (I used the interceptor to set the return code to UTF-8, but it didn't succeed. It seems that the Chinese content before setting the code is already garbled. Of course, this is just my guess))
Here are some screenshots:




**Code**
import org.flowable.spring.SpringProcessEngineConfiguration;
import org.flowable.spring.boot.EngineConfigurationConfigurer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
@Configuration
public class FlowableFontConfig implements EngineConfigurationConfigurer {
private static final Logger log = LoggerFactory.getLogger(FlowableFontConfig.class);
@Override
public void configure(SpringProcessEngineConfiguration engineConfiguration) {
engineConfiguration.setActivityFontName("宋体");
engineConfiguration.setLabelFontName("宋体");
engineConfiguration.setAnnotationFontName("宋体");
log.info("flowable font config");
}
}
**Additional context**
org.springframework.boot
spring-boot-starter-parent
2.4.2
org.flowable
flowable-spring-boot-starter
6.6.0
org.flowable
flowable-ui-common
6.6.0
org.flowable
flowable-ui-modeler-logic
6.6.0
org.flowable
flowable-ui-modeler-rest
6.6.0
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginnen Sie bei org.flowable.ui.modeler.rest.app.ModelResource und seinem getModelThumbnail-Endpunkt. Verfolgen Sie anschließend, wie das gespeicherte Modell-Thumbnail gerendert wird und wie die Schrifteinstellungen von FlowableFontConfig angewendet werden. Reproduzieren Sie dies mit einem chinesischen User-Task-Namen unter Verwendung der bereitgestellten Thumbnail-URL und überprüfen Sie, dass das zurückgegebene Bild die Zeichen normal anzeigt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java, spring-boot
- Bereich
- backend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100