Just to expand a little, while France was liberated in 1944, the regime running Indochina in 1945 was still Vichy affiliated. The Japanese were concerned (probably correctly) that there was a risk of the Vichy forces in Indochina aligning themselves with the Allies, and / or an allied landing on the cost of Vietnam. So in March 1945, the Japanese launched a coup d'etat, over-running the French forces. There was French resistance in Hanoi, Lang Son and a few other places, which the Japanese put down amidst some fairly unpleasant atrocities. As the French were still technically Vichy, allied assistance to them during this fighting was limited.
But several French units (including units of the Foreign Legion) retreated hundreds of kilometers through northern Vietnam into Southern China. The retreat was marked by disease, starvation, desertion and Japanese attack. But the columns made in.
One of the French battalion commanders in that retreat, Colonel Jules Gaucher died in Dien Bien Phu in March 1954, commanding the 13th Legion Demi-Brigade.